Connecting Stripe to AppsFlyer
Stripe knows exactly what was paid, by whom, and when — down to the cent, including the refund three weeks later. AppsFlyer exists because mobile app attribution is a different problem from web attribution, and on iOS a large share of it is now aggregated and delayed by design rather than by accident. The join between them succeeds or fails on one thing: whether the AppsFlyer device identifier, appsflyer_id reaches the Stripe Customer or PaymentIntent before the conversion happens, because AppsFlyer can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Stripe payments into AppsFlyer: only with a device behind them
Only payments started inside the app can reach AppsFlyer: the app sends its appsflyer_id and customer_user_id to your backend, which writes them into Checkout Session metadata. Post af_purchase from the Stripe webhook with revenue and currency from the PaymentIntent, as the only revenue source so purchases are not doubled. Desktop web payments stay out. Send refunds separately.
AppsFlyer's server-to-server events need the appsflyer_id of the device that installed, and a Stripe payment has no idea which device that was. The join exists only when payment starts inside the app: the app reads its AppsFlyer ID and your customer_user_id, sends both to your backend, and the backend writes them into the Checkout Session metadata before opening checkout. When the webhook fires, post af_purchase with revenue and currency from the PaymentIntent, not from what the app believed the price was.
Payments started on your website from a desktop have no install behind them and should not be sent; they belong with your web destinations. AppsFlyer sells web-to-app attribution products, but whether a web Stripe purchase can be credited through them depends on your plan and configuration, so check before promising it to anyone.
The double count on this pair is specific: the app logs an in-app purchase when the user returns from the Stripe page, the backend posts the webhook too, and AppsFlyer records two purchases and forwards both to every connected ad network. Make the webhook the only source of revenue events. Send refunds from charge.refunded as their own event, and confirm in AppsFlyer's documentation how negative revenue is treated in your partner postbacks.
Stripe → AppsFlyer · what breaks
Why this join usually fails — Stripe → AppsFlyer
- 01
The AppsFlyer device identifier, appsflyer_id never reaches Stripe
Stripe Checkout runs on checkout.stripe.com, a different origin from your site, so nothing you set in a first-party cookie travels with the customer. The identifier has to be put into PaymentIntent metadata (or the Checkout Session's metadata) at the moment you create the session, server-side. If you create sessions from a price link or a Buy Button, there is no server step and no metadata — that setup cannot be joined to advertising at all without changing how sessions are created.
- 02
Checkout is on Stripe's domain, so the browser loses the thread
The customer leaves your site, pays somewhere else, and comes back to a thank-you page. Anything relying on browser continuity across that hop is unreliable, and on Safari it is worse than unreliable.
- 03
Web conversions sent to a mobile attribution platform
This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.
- 04
Nothing reconciles afterwards
AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.
Stripe → AppsFlyer · the fix
What working looks like — Stripe → AppsFlyer
The AppsFlyer device identifier, appsflyer_id on every payment
Conversions arriving in AppsFlyer
The event is attributed to the install source, forwarded to whichever networks are configured, and appears in the cohort reporting.
Reconciled against the source
Stripe → AppsFlyer · architecture
How Stripe and AppsFlyer actually connect
- 1
Stripe holds the truth
Every succeeded PaymentIntent is a real conversion with a real amount and currency. No sampling, no modeling, no consent gate. This is the number the business actually banked, which is why it is the reference rather than anything either ad platform reports.
- 2
AppsFlyer needs a click to match
AppsFlyer needs the device identifier and an event name it recognizes, plus the revenue value for in-app purchases. A server event about a user with no linked device cannot be attributed to an install.
- 3
The identifier is the bridge
The AppsFlyer device identifier, appsflyer_id, captured at the visit and carried into the Stripe Customer or PaymentIntent.
- 4
The event source decides reliability
Subscribe to payment_intent.succeeded (or checkout.session.completed) and send from your server when Stripe fires it. Reading a payment from the thank-you page instead means every customer who closes the tab on the redirect is a conversion you never counted, and Stripe redirects after taking money, not before.
- 5
Deduplication at the destination
AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.
Stripe → AppsFlyer · normal or broken
Working vs. broken, side by side — Stripe → AppsFlyer
Normal, not a fault
The AppsFlyer device identifier, appsflyer_id present on the payment
Sent from the Stripe webhook
Deduplicated correctly
AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.
Reconciles with the source
Actually broken
The AppsFlyer device identifier, appsflyer_id missing on most records
Stripe Checkout runs on checkout.stripe.com, a different origin from your site, so nothing you set in a first-party cookie travels with the customer. The identifier has to be put into PaymentIntent metadata (or the Checkout Session's metadata) at the moment you create the session, server-side. If you create sessions from a price link or a Buy Button, there is no server step and no metadata — that setup cannot be joined to advertising at all without changing how sessions are created.
Sent from the browser
The customer leaves your site, pays somewhere else, and comes back to a thank-you page. Anything relying on browser continuity across that hop is unreliable, and on Safari it is worse than unreliable.
Counted twice, or not at all
This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.
Nobody has reconciled it
Stripe → AppsFlyer · diagnose
Diagnostic order — Stripe → AppsFlyer
- 01
Count payments carrying the AppsFlyer device identifier, appsflyer_id
- 02
Follow one real conversion end to end
- 03
Open one succeeded PaymentIntent in the Stripe dashboard
Look at its Metadata section. If the identifier is not there, nothing downstream can fix it — the join is broken at the source and every other check is wasted effort.
- 04
Check what share of your revenue happens in the app at all
If most purchases are on the web, AppsFlyer is not your conversion destination and the work belongs somewhere else entirely.
- 05
Read the match rate, not the success message
AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.
Stripe → AppsFlyer · prove
How it gets proven — Stripe → AppsFlyer
Source of truth
The Stripe dashboard — Payments, filtered to succeeded, for the same window.
- The AppsFlyer device identifier, appsflyer_id confirmed present on a live payment.
- In-app revenue events reconciled per transaction against your billing system, with the organic share stated rather than assumed away.
- A refunded payment confirmed to reverse, not just the sale confirmed to send.
Stripe → AppsFlyer · free audit
What we check in the free audit
- Count payments carrying the AppsFlyer device identifier, appsflyer_id
- Follow one real conversion end to end
- Open one succeeded PaymentIntent in the Stripe dashboard
- Check what share of your revenue happens in the app at all
- Read the match rate, not the success message
Checked against
The Stripe dashboard — Payments, filtered to succeeded, for the same window.
Free30 minutesNo obligation
Stripe → AppsFlyer · when not to buy
When you don't need this — Stripe → AppsFlyer
- Measure identifier coverage yourself first — pull your last hundred payments and count how many carry the AppsFlyer device identifier, appsflyer_id.
- If you take payment through a hosted Payment Link or Buy Button and have no server creating sessions, this needs a development change on your side before any tracking work is worth commissioning. Worth knowing before you pay for tracking.
- If you have no mobile app, this is not a destination for you. If you have one but sell mostly on the web, send web conversions to your ad platforms directly and use AppsFlyer only for install and in-app events.
Stripe → AppsFlyer · what we deliver
What gets built — Stripe → AppsFlyer
Identifier capture into Stripe
Read the click identifier from the landing page, persist it in a first-party cookie, and pass it into the create-session call as metadata. Stripe carries metadata onto the resulting PaymentIntent and Charge, so it survives to the webhook and to any later refund.
Event source: the Stripe webhook
Subscribe to payment_intent.succeeded (or checkout.session.completed) and send from your server when Stripe fires it. Reading a payment from the thank-you page instead means every customer who closes the tab on the redirect is a conversion you never counted, and Stripe redirects after taking money, not before.
Dispatch to AppsFlyer
The AppsFlyer server-to-server events API, posted from your billing system with the device identifier and revenue.
Reversals where they exist
Stripe fires charge.refunded and charge.dispute.created. Both carry the original metadata, so a refund can be sent as a negative or a retraction wherever the destination supports it. Most setups never wire this and quietly overstate revenue by the refund rate.
Written guarantee
95%+ tracking accuracy
Measured against The Stripe dashboard — Payments, filtered to succeeded, for the same window.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Stripe → AppsFlyer questions, answered
Yes, if the payment carries the device's AppsFlyer ID, which means passing it from the app into Stripe metadata before checkout. Desktop web payments with no app install cannot be tied to an install.
From the server on the Stripe webhook, since the app often never sees the confirmed payment. Then remove the SDK purchase event so revenue is not counted twice.
Almost always because the AppsFlyer device identifier, appsflyer_id never reached the Stripe Customer or PaymentIntent. Stripe Checkout runs on checkout.stripe.com, a different origin from your site, so nothing you set in a first-party cookie travels with the customer. The identifier has to be put into PaymentIntent metadata (or the Checkout Session's metadata) at the moment you create the session, server-side. If you create sessions from a price link or a Buy Button, there is no server step and no metadata — that setup cannot be joined to advertising at all without changing how sessions are created. Measure coverage before debugging the dispatch.
AppsFlyer assigns its own device ID and matches installs to clicks through referrer data on Android and Apple's frameworks on iOS. There is no durable cross-device identifier. On iOS without ATT consent, attribution falls back to SKAdNetwork, which returns aggregated conversion values on a delay with no user-level detail at all — so a share of your installs will be attributable only in aggregate, permanently.
The Stripe webhook. Subscribe to payment_intent.succeeded (or checkout.session.completed) and send from your server when Stripe fires it. Reading a payment from the thank-you page instead means every customer who closes the tab on the redirect is a conversion you never counted, and Stripe redirects after taking money, not before.
AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.
More on Stripe → AppsFlyer
- Stripe Billing → AppsFlyerConnecting Stripe Billing to AppsFlyer
- Stripe → Google AdsConnecting Stripe to Google Ads
- Stripe → MetaConnecting Stripe to Meta Conversions API
RELATED GUIDES
Where Stripe → AppsFlyer fits in the rest of your tracking
- Stripe Billing → AppsFlyerConnecting Stripe Billing to AppsFlyer
- PayPal → AppsFlyerConnecting PayPal to AppsFlyer
- SubscriptionsConversion tracking for subscription businesses, across the whole lifecycle
- Stripe Billing → BranchConnecting Stripe Billing to Branch
- PayPal → BranchConnecting PayPal to Branch
- EcommerceConversion tracking for ecommerce brands, measured against your orders
- Stripe → PartnerStackConnecting Stripe to PartnerStack
- Stripe → ImpactConnecting Stripe to Impact.com
Free · 30 min
Get Stripe and AppsFlyer joined properly
Free30 minutesNo obligation
