Skip to main content
Stripe → BranchIntegration guide

Connecting Stripe to Branch

Stripe knows exactly what was paid, by whom, and when — down to the cent, including the refund three weeks later. 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 Stripe Customer or PaymentIntent 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

Stripe payments in Branch: tie the web purchase to the app user

Branch applies when a Stripe payment follows a Branch web link or a deep-link install. Write your user ID, tied to that Branch identity, into Checkout Session metadata, then post the purchase to Branch's server-to-server events API from the webhook with PaymentIntent revenue, currency and ID as transaction ID, shared with any SDK event. Desktop-only payments have nothing to attribute.

Branch earns its place when a Stripe payment follows a Branch link click on the web, or happens for a user who installed from a deep link. For the first, the Branch web SDK holds link context in the browser, so your server has to put your user ID, already tied to that Branch session, into the Checkout Session metadata before the hop to checkout.stripe.com; the web SDK does not follow the customer there. For the second, the app knows the install's link data and the user ID, and the backend writes that ID into the session.

Post the purchase to Branch's server-to-server events API from the Stripe webhook with the identity Branch already associates with that person, revenue and currency from the PaymentIntent, and the PaymentIntent ID as the transaction ID. If the app also logs the commerce event with the Branch SDK on its success screen, both copies are forwarded to the ad partners Branch feeds unless they share that identifier.

If your Stripe payments are all desktop web with no app in the journey, Branch has nothing to attribute and the link is only a redirect. Check whether your Branch plan includes web conversion attribution before relying on it to credit a web purchase to a link; plans differ.

Stripe → Branch · what breaks

Why this join usually fails — Stripe → Branch

  1. 01

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

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

  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.

Stripe → Branch · the fix

What working looks like — Stripe → Branch

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

  • 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

Stripe → Branch · architecture

How Stripe and Branch actually connect

  1. 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. 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 Stripe Customer or PaymentIntent.

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

Stripe → Branch · normal or broken

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

Normal, not a fault

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

  • Sent from the Stripe 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

    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

    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

Stripe → Branch · diagnose

Diagnostic order — Stripe → Branch

  1. 01

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

  2. 02

    Follow one real conversion end to end

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

  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.

Stripe → Branch · prove

How it gets proven — Stripe → Branch

Source of truth

The Stripe dashboard — Payments, filtered to succeeded, for the same window.

  • The Branch link click identifier and the deferred deep link payload confirmed present on a live payment.
  • Attributed installs and in-app purchases reconciled against your own user records, with the unattributed share stated.
  • A refunded payment confirmed to reverse, not just the sale confirmed to send.

Stripe → Branch · free audit

What we check in the free audit

  • Count payments carrying the Branch link click identifier and the deferred deep link payload
  • Follow one real conversion end to end
  • Open one succeeded PaymentIntent in the Stripe dashboard
  • Measure your organic install share and ask whether it is plausible
  • Read the match rate, not the success message

Checked against

The Stripe dashboard — Payments, filtered to succeeded, for the same window.

Get my free conversion tracking audit

Free30 minutesNo obligation

Stripe → Branch · when not to buy

When you don't need this — Stripe → Branch

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

Stripe → Branch · what we deliver

What gets built — Stripe → Branch

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

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

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

Get my free conversion tracking audit

From $400 · See packages

FAQ

Stripe → Branch questions, answered

Yes, if your backend sends the purchase with an identity Branch already tied to the link click or install. Branch cannot see checkout.stripe.com itself.

Free · 30 min

Get Stripe and Branch joined properly

Free30 minutesNo obligation