Skip to main content
Chargebee → BranchIntegration guide

Connecting Chargebee to Branch

Chargebee is a billing system, so it holds the only complete record of what a subscription business earned — and it sits entirely outside the browser. 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 Chargebee subscription 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

Branch deep links and Chargebee web checkout

With Chargebee, users often pay on the web, then install. Send them through a Branch link carrying the Chargebee customer ID, set the Branch identity to the user ID stored on the customer, and report payments to Branch's server-to-server events API with revenue, currency and an event ID derived from the invoice ID, so SDK purchases don't double-count.

Branch earns its place when a campaign link has to survive an app install. With Chargebee, the common flow is the reverse of what Branch is usually set up for: the user pays on the web through Chargebee, then downloads the app. If the post-checkout page sends them to the store with a plain App Store link, the install looks organic and the subscription is never tied to the campaign that sold it. Send them through a Branch link that carries the Chargebee customer ID, so the first app open can identify them.

Once the app knows the user, set the Branch identity to the same user ID you store on the Chargebee customer. Your backend then reports Chargebee payments to Branch's server-to-server events API against that identity, with revenue and currency, using Branch's standard commerce or subscription events where they fit (confirm the current names in Branch's docs).

Supply your own event ID derived from the Chargebee invoice ID. If the app SDK also logs a purchase for the same subscription, for example when Chargebee manages App Store subscriptions as well, a shared ID is what stops Branch counting it twice and forwarding both copies to the ad networks connected to it. On iOS the deferred deep-link payload can arrive incomplete, so treat the web-checkout identity link as the reliable path and the deep link as a bonus.

Chargebee → Branch · what breaks

Why this join usually fails — Chargebee → Branch

  1. 01

    The Branch link click identifier and the deferred deep link payload never reaches Chargebee

    The identifier must live on the customer or subscription so it survives a trial period that is longer than any browser cookie you can rely on. Chargebee's hosted checkout is also a different origin, so nothing crosses it by default.

  2. 02

    Trials longer than any cookie

    The gap between signup and first payment is where the identifier has to survive, and it is measured in weeks. Browser storage will not do it.

  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.

Chargebee → Branch · the fix

What working looks like — Chargebee → Branch

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

  • 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

Chargebee → Branch · architecture

How Chargebee and Branch actually connect

  1. 1

    Chargebee holds the truth

    The distinction that matters most here is invoice generated versus payment succeeded. An invoice is a bill you sent; a payment is money you received, and in any business with dunning the gap between them is large.

  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 Chargebee subscription.

  4. 4

    The event source decides reliability

    Fire on payment succeeded, not invoice generated, and key the conversion on the billing period so a dunning sequence with four retries produces one conversion rather than four.

  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.

Chargebee → Branch · normal or broken

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

Normal, not a fault

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

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

    The identifier must live on the customer or subscription so it survives a trial period that is longer than any browser cookie you can rely on. Chargebee's hosted checkout is also a different origin, so nothing crosses it by default.

  • Sent from the browser

    The gap between signup and first payment is where the identifier has to survive, and it is measured in weeks. Browser storage will not do it.

  • 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

Chargebee → Branch · diagnose

Diagnostic order — Chargebee → Branch

  1. 01

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

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether the event fires on invoice or on payment

    Invoice-based firing counts money you have not received, and in a business with dunning that overstates consistently.

  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.

Chargebee → Branch · prove

How it gets proven — Chargebee → Branch

Source of truth

Chargebee's paid invoices by payment date, net of refunds and failed payments.

  • The Branch link click identifier and the deferred deep link payload confirmed present on a live subscription.
  • Attributed installs and in-app purchases reconciled against your own user records, with the unattributed share stated.
  • A dunning sequence confirmed to produce one conversion rather than one per retry.

Chargebee → Branch · free audit

What we check in the free audit

  • Count subscriptions carrying the Branch link click identifier and the deferred deep link payload
  • Follow one real conversion end to end
  • Check whether the event fires on invoice or on payment
  • Measure your organic install share and ask whether it is plausible
  • Read the match rate, not the success message

Checked against

Chargebee's paid invoices by payment date, net of refunds and failed payments.

Get my free conversion tracking audit

Free30 minutesNo obligation

Chargebee → Branch · when not to buy

When you don't need this — Chargebee → Branch

  • Measure identifier coverage yourself first — pull your last hundred subscriptions and count how many carry the Branch link click identifier and the deferred deep link payload.
  • If your trial is longer than 90 days, uploading the first payment against the original click cannot work — we will tell you that before quoting.
  • If you have no app, or no web surface driving app installs, there is no seam here to bridge and the integration solves nothing.

Chargebee → Branch · what we deliver

What gets built — Chargebee → Branch

  • Identifier capture into Chargebee

    Write the click identifier to a custom field on the Chargebee customer or subscription when the subscription is created, server-side, rather than relying on the hosted checkout page to carry it.

  • Event source: the Chargebee payment_succeeded webhook

    Fire on payment succeeded, not invoice generated, and key the conversion on the billing period so a dunning sequence with four retries produces one conversion rather than four.

  • 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

    Cancellations and refunds are exposed and should reverse the lifetime value claimed at acquisition.

Written guarantee

95%+ tracking accuracy

Measured against Chargebee's paid invoices by payment date, net of refunds and failed payments.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Chargebee → Branch questions, answered

Link Branch's identity to the same user ID stored on the Chargebee customer, then report payments server-to-server against that identity.

Free · 30 min

Get Chargebee and Branch joined properly

Free30 minutesNo obligation