---
title: Stripe
description: 
product: data
token_estimate: 2754
---
# Stripe

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

This integration imports revenue events from [Stripe](https://stripe.com/) into Amplitude, so you can track and analyze your Stripe financial data in Amplitude.

> **Note:**
>
> Amplitude maintains this integration. For help, [contact Amplitude support](https://amplitude.zendesk.com/hc/en-us/requests/new).

## Prerequisites

- If you have multiple Amplitude projects, configure this integration separately for each one to ensure accurate event tracking.
- Amplitude can't distinguish between Stripe events from different accounts, because Stripe event payloads don't include an account identifier. If you connect multiple Stripe accounts to the same Amplitude project, you may experience data duplication and inaccurate revenue reporting.
- This integration only records events that occur after you configure the Stripe webhook. It doesn't retroactively capture or send to Amplitude anything that happened before that, so configure it as early as possible.
- Before sending revenue data to Amplitude, normalize all financial amounts to your preferred currency. Amplitude doesn't automatically handle currency conversion, and inconsistent currency reporting could distort revenue insights.
- This integration only ingests revenue-related transaction events.
- To avoid tracking inaccuracies, set `amplitude_id` or `user_id` correctly in the metadata. Otherwise, events from the same user may appear as separate users in Amplitude. Update your Stripe client to pass the correct user identifier within the metadata fields for proper event deduplication.

## Set up the integration

1. Log into your Stripe account and navigate to _Developers > Event Destination_.
2. Click **Add Endpoint** to create a webhook.
3. Paste the provided URL into the _Endpoint URL_ field to direct data to your Amplitude project.
4. Select API version 2024-06-20 and choose the events you want to ingest into Amplitude.
5. Click **Select Events** to specify the topics you want to forward to Amplitude. Note that Amplitude categorizes `payment_intent` as revenue events.
6. Set the correct user ID in your Stripe client code to ensure proper deduplication of user events between Stripe and Amplitude. The integration looks for the user ID in a specific order of priority from the event payload. Make sure the user ID is correctly passed as metadata in the payment intent or other relevant events.

Here is the order in which Amplitude picks up the user ID from Stripe event data:

- `data.object.metadata.amplitude_id`
- `data.object.metadata.user_id`
- `data.object.customer_email`
- `data.object.customer.email`
- `data.object.receipt_email`
- `data.object.customer`

## View Stripe events in Amplitude: Example charts and cohorts

Here are some key charts and metrics you can track after you set up the integration.

### Total revenue

1. **Select an event**: Choose the event that tracks successful payments or transactions, such as `[Stripe] invoice.payment_succeeded`.
2. **Set a metric**: Use _Property Sum_ to calculate the total revenue. Set the property to `amount_paid` or another property that stores the revenue amount. This sums the total revenue from all successful payment events.
3. **Apply segmentation**: Choose _All Users_ for an overview of total revenue generated by all users who triggered the event from step 1 above.

### Average number of purchases per user

1. **Select an event**: Choose an event that represents a successful transaction or purchase, such as `self-serve: stripe payment intent success` , `Purchase Completed` , or `Order Success`.
2. **Set a metric**: Measure the average number of events per user to track how often users trigger the event.
3. **Apply segmentation**: Choose _All Users_ for an overview of all user activity related to that event.

### Distribution of purchase frequency

1. **Select an event**: Choose an event that tracks successful payments or purchases, such as `[Stripe] invoice.payment_succeeded`.
2. **Set a metric**: Choose _Frequency_ to measure how many times users have triggered the selected event.
3. **Set buckets**: Define the buckets to categorize purchase frequency. This helps visualize how many users fall into each frequency category.
4. **Apply segmentation**: Choose _All Users_ for an overview of how often users make purchases.

### N-week retention

1. **Select a starting event**: Choose the event that represents a successful transaction or purchase, such as `[Stripe] invoice.payment_succeeded`.
2. **Select a return event**: Choose the same event, or a similar one, to track users who come back to make another purchase.
3. **Set the retention metric**: Select _Return On_ to measure retention based on when users return to trigger the same event in specific time windows (for example, weeks). The chart displays retention across multiple weeks (Week 0, Week 1, and so forth), showing how many users return after making a purchase in subsequent weeks.
4. **Apply segmentation**: Choose _All Users_ for an overview of all users who made a purchase and returned.

### Revenue by product

1. **Select an event**: Choose the event that represents a successful transaction or payment, such as `[Stripe] invoice.payment_succeeded`.
2. **Set a metric**: Use _Property Sum_ to calculate the total revenue. Group by the product category or name using the description field (or a similar field) that stores product details. This sums up the total revenue for each product.
3. **Group by product**: Group the results by product name or category to visualize revenue per product.
4. **Apply segmentation**: Choose _All Users_ for a breakdown of revenue for all products sold.

### Number of orders by product

1. **Select an event**: Choose the event that represents successful transactions or orders, such as `[Stripe] invoice.payment_succeeded`.
2. **Set a metric**: Use _Uniques_ to count the unique occurrences of the event.
3. **Group by product**: Group the data by the product name or description using the _Description_ field (or a similar product-related field). This breaks down the number of orders per product.
4. **Apply segmentation**: Choose _All Users_ for a complete overview of the number of orders for each product made by all users.

### Cohort: Users who spent more than $100 in their first seven days

1. **Select users who performed an event**: Choose the event that captures successful transactions, such as `[Stripe] payment_intent.succeeded`.
2. **Set a revenue condition**: Apply a condition where `$revenue > 100` to filter for users who spent more than $100, either in a single transaction or over multiple transactions.
3. **Set a count condition**: Add a condition to ensure the event occurred at least once.
4. **Define the timeframe**: Specify that the transactions must have occurred during the first seven days after the user's first interaction, or within the last 30 days for more flexible tracking.

## Supported Stripe events in Amplitude

This table lists revenue-related events sent from Stripe to Amplitude. These events let you track financial transactions such as charges, refunds, invoices, and payments. For more detailed information on the properties associated with each event, [refer to the official Stripe events documentation](https://docs.stripe.com/api/events/types).

| Category | Stripe event | Description |
| --- | --- | --- |
| Charges and refunds | `charge.succeeded` | Occurs when a charge is successful. |
| Charges and refunds | `charge.refunded` | Occurs when a charge is refunded, including partial refunds. |
| Charges and refunds | `charge.captured` | Occurs when a previously uncaptured charge is captured. |
| Charges and refunds | `charge.updated` | Occurs when a charge description or metadata is updated, or upon an asynchronous capture. |
| Charges and refunds | `charge.failed` | Occurs when a failed charge attempt occurs. |
| Invoices | `invoice.payment_succeeded` | Occurs when an invoice payment attempt succeeds. |
| Invoices | `invoice.paid` | Occurs when an invoice payment attempt succeeds or an invoice is marked as paid out-of-band. |
| Invoices | `invoice.finalized` | Occurs when a draft invoice is finalized and updated to an open invoice. |
| Invoices | `invoice.marked_uncollectible` | Occurs when an invoice is marked uncollectible. |
| Invoices | `invoice.payment_failed` | Occurs when an invoice payment attempt fails. |
| Invoices | `invoice.voided` | Occurs when an invoice is voided. |
| Invoices | `invoice.sent` | Occurs when an invoice email is sent. |
| Invoices | `invoice.created` | Occurs when a new invoice is created. To learn how webhooks can be used with this event, and how they can affect it, see Using Webhooks with Subscriptions. |
| Payment intents | `payment_intent.succeeded` | Occurs when a `PaymentIntent` has successfully completed payment. This event is a special `$revenue` event in Amplitude. |
| Payment intents | `payment_intent.canceled` | Occurs when a `PaymentIntent` is canceled. |
| Payment intents | `payment_intent.payment_failed` | Occurs when a `PaymentIntent` has failed the attempt to create a payment method or a payment. |
| Payment intents | `payment_intent.amount_capturable_updated` | Occurs when a `PaymentIntent` has funds to be captured. Check the `amount_capturable` property on the `PaymentIntent` to determine the amount that can be captured. You may capture the `PaymentIntent` with an `amount_to_capture` value up to the specified amount. [Learn more about capturing PaymentIntents](https://docs.stripe.com/api/payment_intents/capture). |
| Checkout sessions | `checkout.session.completed` | Occurs when a checkout session has been successfully completed. |
| Checkout sessions | `checkout.session.async_payment_succeeded` | Occurs when a payment intent using a delayed payment method succeeds. |
| Checkout sessions | `checkout.session.async_payment_failed` | Occurs when a payment intent using a delayed payment method fails. |
| Application fees | `application_fee.created` | Occurs when an application fee is created on a charge. |
| Application fees | `application_fee.refunded` | Occurs when an application fee is refunded, whether from refunding a charge or from [refunding the application fee directly](https://docs.stripe.com/api/events/types#fee_refunds). This includes partial refunds. |
| Application fees | `application_fee.refund.updated` | Occurs when an application fee refund is updated. |
| Balance | `balance.available` | Occurs when your Stripe balance has been updated. By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis. This event is not triggered for negative transactions. |
| Issuing | `issusing_authorization.created` | Occurs when an authorization is created. |
| Issuing | `issusing_transaction.created` | Occurs when an issuing transaction is created. |

