Connecting Braintree to AppsFlyer
Braintree is a payment gateway rather than a storefront, so it sits underneath whatever is taking the order and holds the transaction itself. 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 Braintree transaction 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
Braintree in-app payments to AppsFlyer, keyed on appsflyer_id
Send only in-app Braintree payments to AppsFlyer. Mark app versus web in a custom field, read appsflyer_id from the SDK at payment request and store it in a Braintree custom field, then post the purchase to the server-to-server events API on settlement with amount and merchant-account currency. Drop the duplicate SDK purchase and send refunds as their own event.
AppsFlyer is the right destination for Braintree transactions that happen inside your app, such as a delivery, marketplace or booking app using Braintree's iOS or Android SDK, and the wrong one for transactions on your website. Many businesses run both through the same Braintree account, so the first job is telling them apart: write the channel into a custom field when the transaction is created, or app and web payments arrive at your webhook indistinguishable.
For app transactions, read appsflyer_id from the AppsFlyer SDK when the app requests a payment, send it to your server with the payment method nonce, and store it in a Braintree custom field. When the transaction settles, post the purchase to the AppsFlyer server-to-server events API with that device ID, the amount and the merchant account's currency. If the app also logs a purchase through the SDK on the success screen, drop one of the two; AppsFlyer forwards purchases to ad networks, so a duplicate inflates revenue everywhere.
Refunds and lost disputes are not reversed in AppsFlyer on their own. If networks receive revenue for ROAS bidding, send them as a refund event and confirm in your account how AppsFlyer and each network treat negative revenue.
Braintree → AppsFlyer · what breaks
Why this join usually fails — Braintree → AppsFlyer
- 01
The AppsFlyer device identifier, appsflyer_id never reaches Braintree
Braintree is a gateway, so it sees the payment and not the marketing. The identifier has to be attached at the point your application creates the transaction, through custom fields, or it never enters Braintree at all.
- 02
A gateway that knows nothing about marketing
Braintree sees a payment. Whether it can be tied to a click depends entirely on whether your own application attached the identifier when creating the transaction, and most do not.
- 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.
Braintree → AppsFlyer · the fix
What working looks like — Braintree → AppsFlyer
The AppsFlyer device identifier, appsflyer_id on every transaction
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
Braintree → AppsFlyer · architecture
How Braintree and AppsFlyer actually connect
- 1
Braintree holds the truth
Settled and authorised are different states. Authorisation reserves the funds; settlement is money moving, and reporting on the wrong one produces a persistent gap against your bank.
- 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 Braintree transaction.
- 4
The event source decides reliability
Fire on settlement rather than authorisation, and note that Braintree's PayPal and wallet flows redirect the buyer away — so the confirmation page is not a reliable trigger.
- 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.
Braintree → AppsFlyer · normal or broken
Working vs. broken, side by side — Braintree → AppsFlyer
Normal, not a fault
The AppsFlyer device identifier, appsflyer_id present on the transaction
Sent from the Braintree transaction settlement 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
Braintree is a gateway, so it sees the payment and not the marketing. The identifier has to be attached at the point your application creates the transaction, through custom fields, or it never enters Braintree at all.
Sent from the browser
Braintree sees a payment. Whether it can be tied to a click depends entirely on whether your own application attached the identifier when creating the transaction, and most do not.
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
Braintree → AppsFlyer · diagnose
Diagnostic order — Braintree → AppsFlyer
- 01
Count transactions carrying the AppsFlyer device identifier, appsflyer_id
- 02
Follow one real conversion end to end
- 03
Open a settled transaction and check its custom fields
If the identifier is not there, your application never attached it and nothing downstream can recover it.
- 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.
Braintree → AppsFlyer · prove
How it gets proven — Braintree → AppsFlyer
Source of truth
Braintree's transaction records, filtered to settled, for the same window.
- The AppsFlyer device identifier, appsflyer_id confirmed present on a live transaction.
- In-app revenue events reconciled per transaction against your billing system, with the organic share stated rather than assumed away.
- A PayPal-funded transaction confirmed to report even though the buyer was redirected away.
Braintree → AppsFlyer · free audit
What we check in the free audit
- Count transactions carrying the AppsFlyer device identifier, appsflyer_id
- Follow one real conversion end to end
- Open a settled transaction and check its custom fields
- Check what share of your revenue happens in the app at all
- Read the match rate, not the success message
Checked against
Braintree's transaction records, filtered to settled, for the same window.
Free30 minutesNo obligation
Braintree → AppsFlyer · when not to buy
When you don't need this — Braintree → AppsFlyer
- Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the AppsFlyer device identifier, appsflyer_id.
- If your platform already reports orders accurately and Braintree is purely the funding rail, work at the order layer instead — it is closer to the customer.
- 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.
Braintree → AppsFlyer · what we deliver
What gets built — Braintree → AppsFlyer
Identifier capture into Braintree
Pass the click identifier into the transaction's custom fields when your server creates the charge. Braintree preserves them and they survive to the webhook and to any later refund.
Event source: the Braintree transaction settlement webhook
Fire on settlement rather than authorisation, and note that Braintree's PayPal and wallet flows redirect the buyer away — so the confirmation page is not a reliable trigger.
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
Braintree exposes refunds and disputes, both carrying the original custom fields, so reversals are straightforward.
Written guarantee
95%+ tracking accuracy
Measured against Braintree's transaction records, filtered to settled, for the same window.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Braintree → AppsFlyer questions, answered
Pass appsflyer_id from the app to your server with the payment, store it in a Braintree custom field, and post the settled transaction to AppsFlyer's server-to-server events API.
No. They have no device or install behind them; send them to your ad platforms directly and keep AppsFlyer for in-app events.
Almost always because the AppsFlyer device identifier, appsflyer_id never reached the Braintree transaction. Braintree is a gateway, so it sees the payment and not the marketing. The identifier has to be attached at the point your application creates the transaction, through custom fields, or it never enters Braintree at all. 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 Braintree transaction settlement webhook. Fire on settlement rather than authorisation, and note that Braintree's PayPal and wallet flows redirect the buyer away — so the confirmation page is not a reliable trigger.
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 Braintree → AppsFlyer
- Braintree → Google AdsConnecting Braintree to Google Ads
- Braintree → MetaConnecting Braintree to Meta Conversions API
- Braintree → GA4Connecting Braintree to GA4
RELATED GUIDES
Where Braintree → AppsFlyer fits in the rest of your tracking
- Shopify POS → AppsFlyerConnecting Shopify POS to AppsFlyer
- Saleor → AppsFlyerConnecting Saleor to AppsFlyer
- Wix → AppsFlyerConnecting Wix Stores to AppsFlyer
- Furniture ecommerceConversion tracking for furniture ecommerce, measured after delivery
- Ecwid → AppsFlyerConnecting Ecwid to AppsFlyer
- PrestaShop → AppsFlyerConnecting PrestaShop to AppsFlyer
- WooCommerce → AppsFlyerConnecting WooCommerce to AppsFlyer
- Swell → AppsFlyerConnecting Swell to AppsFlyer
Free · 30 min
Get Braintree and AppsFlyer joined properly
Free30 minutesNo obligation
