On this page

Stripe

This integration allows you to import revenue events from Stripe into Amplitude, enabling seamless tracking and analysis of your Stripe financial data in Amplitude.

Beta

This feature is in Beta. This feature may continue to evolve. This documentation may not yet reflect the latest updates.

Amplitude maintains this integration. For help, contact Amplitude support.

Before you begin

  • If you have multiple Amplitude projects, you must 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, make sure to 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 wish to forward to Amplitude. Keep in mind 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 once you’ve 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 frequently users are triggering 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 frequently users are making 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, etc.), 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. They allow you to 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.

CategoryStripe eventDescription
Charges and refundscharge.succeededOccurs when a charge is successful.
Charges and refundscharge.refundedOccurs when a charge is refunded, including partial refunds.
Charges and refundscharge.capturedOccurs when a previously uncaptured charge is captured.
Charges and refundscharge.updatedOccurs when a charge description or metadata is updated, or upon an asynchronous capture.
Charges and refundscharge.failedOccurs when a failed charge attempt occurs.
Invoicesinvoice.payment_succeededOccurs when an invoice payment attempt succeeds.
Invoicesinvoice.paidOccurs when an invoice payment attempt succeeds or an invoice is marked as paid out-of-band.
Invoicesinvoice.finalizedOccurs when a draft invoice is finalized and updated to an open invoice.
Invoicesinvoice.marked_uncollectibleOccurs when an invoice is marked uncollectible.
Invoicesinvoice.payment_failedOccurs when an invoice payment attempt fails.
Invoicesinvoice.voidedOccurs when an invoice is voided.
Invoicesinvoice.sentOccurs when an invoice email is sent.
Invoicesinvoice.createdOccurs 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 intentspayment_intent.succeededOccurs when a PaymentIntent has successfully completed payment. This event is a special $revenue event in Amplitude.
Payment intentspayment_intent.canceledOccurs when a PaymentIntent is canceled.
Payment intentspayment_intent.payment_failedOccurs when a PaymentIntent has failed the attempt to create a payment method or a payment.
Payment intentspayment_intent.amount_capturable_updatedOccurs 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.
Checkout sessionscheckout.session.completedOccurs when a checkout session has been successfully completed.
Checkout sessionscheckout.session.async_payment_succeededOccurs when a payment intent using a delayed payment method succeeds.
Checkout sessionscheckout.session.async_payment_failedOccurs when a payment intent using a delayed payment method fails.
Application feesapplication_fee.createdOccurs when an application fee is created on a charge.
Application feesapplication_fee.refundedOccurs when an application fee is refunded, whether from refunding a charge or from refunding the application fee directly. This includes partial refunds.
Application feesapplication_fee.refund.updatedOccurs when an application fee refund is updated.
Balancebalance.availableOccurs 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.
Issuingissusing_authorization.createdOccurs when an authorization is created.
Issuingissusing_transaction.createdOccurs when an issuing transaction is created.

Was this helpful?