GrowthRailDocs

Webhook events

EventWhat it signalsGrowth Rail action
subscription_startedPurchase confirmed by provider.Record purchase proof; join to pending SDK attribution claim.
trial_convertedPurchase confirmed by provider.Record purchase proof; join to pending SDK attribution claim.
non_subscription_purchasePurchase confirmed by provider.Record purchase proof; join to pending SDK attribution claim.

How attribution works

A verified provider event proves the purchase happened — but not that the user was referred. Growth Rail completes a referral only when that event joins to the opaque attribution claim previously captured by the SDK on the referring user's device.

Identity rule: Growth Rail joins events to claims using stable IDs and opaque tokens. It never correlates users by email, name, phone number, or billing address.
1

Create the Growth Rail connection

Open Dashboard → Integrations → Purchases, choose Adapty, and create a Sandbox or Production connection. Copy the generated webhook endpoint URL — you will paste it into Adapty in the next step.

2

Register the webhook in Adapty

In Adapty → Integrations → Webhooks, add the copied endpoint and subscribe to subscription_started, trial_converted, non_subscription_purchase.

Return to Growth Rail and save the The exact Authorization header value configured in Adapty. Growth Rail encrypts and stores it — the raw value is never returned by the API after saving.

Security: Never commit webhook secrets to source control or log them. If a secret is compromised, rotate it in both Adapty and Growth Rail immediately.
3

Pass attribution data from your app

Identify the Adapty profile with the same stable app user ID used by Growth Rail. Store gr_attribution as a custom profile attribute when available.

tsx
const { getAttributionToken } = useGrowthRail();

await adapty.identify(currentUser.id);
const attribution = await getAttributionToken();

if (attribution) {
  await adapty.updateProfile({
    customAttributes: { gr_attribution: attribution },
  });
}
4

Verify end-to-end in test mode

Use an Adapty sandbox profile to make one test purchase. Confirm the selected event and profile_event_id in Growth Rail.

OutcomeMeaning
CompletedPurchase proof and SDK attribution token matched. The referral reward has been triggered.
Awaiting attributionThe webhook signature was valid, but the SDK claim has not arrived yet — or the stable user ID did not match a pending claim. The event is held; Growth Rail completes the referral when the claim arrives.
IgnoredThe event was verified but no matching attribution claim exists and the hold window has expired, or the event type is out of scope.
Provider-specific notes
  • Adapty provides separate production and sandbox destinations; connect each to the matching Growth Rail environment.
  • If your Adapty plan/app only permits one URL and it is already in use, you need a webhook fan-out service before adding Growth Rail.
  • Refund and chargeback events do not automatically reverse issued rewards in the current version.