Skip to main content
Braintree → BranchIntegration guide

Connecting Braintree to Branch

Braintree is a payment gateway rather than a storefront, so it sits underneath whatever is taking the order and holds the transaction itself. Branch's real job is the web-to-app seam — a person clicks a link in a browser, installs the app, and something has to carry the context across an install that destroys every cookie involved. The join between them succeeds or fails on one thing: whether the Branch link click identifier and the deferred deep link payload reaches the Braintree transaction before the conversion happens, because Branch can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Braintree and Branch: crediting in-app payments to the web link

Branch credits in-app Braintree payments to the mobile web campaign that drove the install. Set the Branch identity to your user ID when the app opens from the deferred deep link, store that same user ID in a Braintree custom field, and post the purchase to Branch's server-to-server API on settlement with a stable transaction ID. Keep web checkouts separate.

Branch earns its place with Braintree when a paid campaign sends someone from a mobile web page into your app and the payment happens later inside the app through Braintree's mobile SDK. Without Branch's deferred deep link, that buyer opens the app as a new organic user, and the settled Braintree transaction is credited to no campaign at all.

Join the two on your own user ID. When the app opens with the Branch payload, set the Branch identity to your user ID; when the app requests a payment, store the same user ID in a Braintree custom field. Post the purchase to Branch's server-to-server events API when the transaction settles, with the user ID, amount, currency and a stable transaction identifier, and do not also log the same purchase from the Branch SDK on the success screen without that shared identifier.

Braintree on your website is a separate stream. If the web checkout also runs on Braintree, decide whether Branch should see web purchases at all; usually ad platforms and analytics handle them, and Branch's job is the install seam. Refunds and lost disputes do not change Branch's attributed revenue unless you send them, which matters if Branch forwards revenue to networks for value-based bidding.

Braintree → Branch · what breaks

Why this join usually fails — Braintree → Branch

  1. 01

    The Branch link click identifier and the deferred deep link payload 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.

  2. 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.

  3. 03

    The install that erases the campaign

    Someone clicks a paid ad on the mobile web, hits the app store, installs, and opens the app as a brand new anonymous user. Without deferred deep linking that campaign produced an organic install, and the ad account shows nothing for a conversion it genuinely caused.

  4. 04

    Nothing reconciles afterwards

    Branch shows the attributed link and campaign on the event in its dashboard. Check that the install carries a link click rather than showing as organic, which is the failure this product exists to prevent.

Braintree → Branch · the fix

What working looks like — Braintree → Branch

  • The Branch link click identifier and the deferred deep link payload on every transaction

  • Conversions arriving in Branch

    The event is attributed to the originating link and campaign, and forwarded to any configured downstream partners.

  • Reconciled against the source

Braintree → Branch · architecture

How Braintree and Branch actually connect

  1. 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. 2

    Branch needs a click to match

    Branch needs the link click context matched to the app open, plus the event and its revenue. Without the deferred deep link payload there is nothing to join the install to.

  3. 3

    The identifier is the bridge

    The Branch link click identifier and the deferred deep link payload, captured at the visit and carried into the Braintree transaction.

  4. 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. 5

    Deduplication at the destination

    Branch deduplicates on the event identifier you supply. Firing a purchase from both the SDK and your server without a shared identifier double-counts, and Branch forwards to downstream partners, so the duplicate propagates.

Braintree → Branch · normal or broken

Working vs. broken, side by side — Braintree → Branch

Normal, not a fault

  • The Branch link click identifier and the deferred deep link payload present on the transaction

  • Sent from the Braintree transaction settlement webhook

  • Deduplicated correctly

    Branch deduplicates on the event identifier you supply. Firing a purchase from both the SDK and your server without a shared identifier double-counts, and Branch forwards to downstream partners, so the duplicate propagates.

  • Reconciles with the source

Actually broken

  • The Branch link click identifier and the deferred deep link payload 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

    Someone clicks a paid ad on the mobile web, hits the app store, installs, and opens the app as a brand new anonymous user. Without deferred deep linking that campaign produced an organic install, and the ad account shows nothing for a conversion it genuinely caused.

  • Nobody has reconciled it

Braintree → Branch · diagnose

Diagnostic order — Braintree → Branch

  1. 01

    Count transactions carrying the Branch link click identifier and the deferred deep link payload

  2. 02

    Follow one real conversion end to end

  3. 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.

  4. 04

    Measure your organic install share and ask whether it is plausible

    An implausibly large organic share is usually broken attribution rather than genuine word of mouth.

  5. 05

    Read the match rate, not the success message

    Branch shows the attributed link and campaign on the event in its dashboard. Check that the install carries a link click rather than showing as organic, which is the failure this product exists to prevent.

Braintree → Branch · prove

How it gets proven — Braintree → Branch

Source of truth

Braintree's transaction records, filtered to settled, for the same window.

  • The Branch link click identifier and the deferred deep link payload confirmed present on a live transaction.
  • Attributed installs and in-app purchases reconciled against your own user records, with the unattributed share stated.
  • A PayPal-funded transaction confirmed to report even though the buyer was redirected away.

Braintree → Branch · free audit

What we check in the free audit

  • Count transactions carrying the Branch link click identifier and the deferred deep link payload
  • Follow one real conversion end to end
  • Open a settled transaction and check its custom fields
  • Measure your organic install share and ask whether it is plausible
  • Read the match rate, not the success message

Checked against

Braintree's transaction records, filtered to settled, for the same window.

Get my free conversion tracking audit

Free30 minutesNo obligation

Braintree → Branch · when not to buy

When you don't need this — Braintree → Branch

  • Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the Branch link click identifier and the deferred deep link payload.
  • 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 app, or no web surface driving app installs, there is no seam here to bridge and the integration solves nothing.

Braintree → Branch · what we deliver

What gets built — Braintree → Branch

  • 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 Branch

    The Branch server-to-server events API, posted from your backend with the user identity and event data.

  • 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.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Braintree → Branch questions, answered

Set your user ID as the Branch identity on first open, store it on the Braintree transaction, and post the settled purchase to Branch server-to-server with that ID.

Free · 30 min

Get Braintree and Branch joined properly

Free30 minutesNo obligation