Skip to main content
Chargebee → AppsFlyerIntegration guide

Connecting Chargebee to AppsFlyer

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

Chargebee revenue in AppsFlyer for web-to-app subscriptions

For web-to-app subscriptions, have the app pass the appsflyer_id to your backend at sign-in and write it to a Chargebee custom field. Report payment_succeeded via AppsFlyer's server-to-server API with revenue and currency, keeping trial, first payment and renewals distinct. Decide which side reports each purchase type, or App Store purchases count twice.

AppsFlyer attributes installs to device IDs; Chargebee bills customers. The pair is useful when a subscription bought on the web gives access to an app, or the app sends users to a web checkout. To attribute that revenue, the appsflyer_id has to be stored against the Chargebee customer, which means the app passes it to your backend when the user signs in and your backend writes it to a Chargebee custom field. A Chargebee customer with no device ID cannot be credited to an install.

Report from the payment_succeeded webhook through AppsFlyer's server-to-server events API, using its predefined subscription or purchase events (check the exact names your account recognizes), the revenue and currency. Keep trial start, first payment and renewals as distinct events so ad networks receiving AppsFlyer's postbacks optimize on paid users, not on trials that never convert.

The common breakage is double reporting. If the app SDK already logs an App Store or Play purchase, and Chargebee also manages that subscription and your server reports its payment, AppsFlyer records two purchases and forwards both to every network. Decide per purchase type which side reports, and remember that iOS users attributed through SKAdNetwork will never connect to a Chargebee customer at the user level at all.

Chargebee → AppsFlyer · what breaks

Why this join usually fails — Chargebee → AppsFlyer

  1. 01

    The AppsFlyer device identifier, appsflyer_id 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

    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.

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

Chargebee → AppsFlyer · the fix

What working looks like — Chargebee → AppsFlyer

  • The AppsFlyer device identifier, appsflyer_id on every subscription

  • 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

Chargebee → AppsFlyer · architecture

How Chargebee and AppsFlyer 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

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

    The identifier is the bridge

    The AppsFlyer device identifier, appsflyer_id, 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

    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.

Chargebee → AppsFlyer · normal or broken

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

Normal, not a fault

  • The AppsFlyer device identifier, appsflyer_id present on the subscription

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

    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

    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

Chargebee → AppsFlyer · diagnose

Diagnostic order — Chargebee → AppsFlyer

  1. 01

    Count subscriptions carrying the AppsFlyer device identifier, appsflyer_id

  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

    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.

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

Chargebee → AppsFlyer · prove

How it gets proven — Chargebee → AppsFlyer

Source of truth

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

  • The AppsFlyer device identifier, appsflyer_id confirmed present on a live subscription.
  • In-app revenue events reconciled per transaction against your billing system, with the organic share stated rather than assumed away.
  • A dunning sequence confirmed to produce one conversion rather than one per retry.

Chargebee → AppsFlyer · free audit

What we check in the free audit

  • Count subscriptions carrying the AppsFlyer device identifier, appsflyer_id
  • Follow one real conversion end to end
  • Check whether the event fires on invoice or on payment
  • Check what share of your revenue happens in the app at all
  • 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 → AppsFlyer · when not to buy

When you don't need this — Chargebee → AppsFlyer

  • Measure identifier coverage yourself first — pull your last hundred subscriptions and count how many carry the AppsFlyer device identifier, appsflyer_id.
  • 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 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.

Chargebee → AppsFlyer · what we deliver

What gets built — Chargebee → AppsFlyer

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

    The AppsFlyer server-to-server events API, posted from your billing system with the device identifier and revenue.

  • 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 → AppsFlyer questions, answered

Store the appsflyer_id on the Chargebee customer when the user signs in to the app, then post payment events server-to-server with that ID and the revenue.

Free · 30 min

Get Chargebee and AppsFlyer joined properly

Free30 minutesNo obligation