Adapty

Use Adapty webhooks as an event source — validate referrals on real paid conversions with zero instrumentation

If your app runs Adapty, Invitebase can qualify referrals on real subscription revenue without any purchase instrumentation. Connect Adapty's webhooks once, and purchase, renewal, and trial-conversion events flow into the same gate engine as SDK events — selectable in the rule builder like anything you track yourself.

Connect Adapty

In the dashboard, open Developer tools → Integrations → Connect a source and select Adapty. Invitebase generates:

  • a unique webhook URL for this connection, e.g. https://api.invitebase.com/v1/integrations/adapty/3e9b5d1c-7f42-4c86-a1e0-6d4f8b2c9e57
  • an authorization header value, shown once — this is how the connection authenticates Adapty's requests

In Adapty, go to App settings → Integrations → Webhook, paste the URL as the endpoint, and set the authorization header to the value from step 1. Enable it for both production and sandbox endpoints so the full test loop works.

The connection shows Waiting for first event…. Make a sandbox purchase (or send Adapty's test event) and the panel renders the received event and flips to Connected.

Environments

Adapty distinguishes sandbox and production events; Invitebase routes them automatically:

Adapty environmentInvitebase mode
SandboxTest mode
ProductionLive mode

Sandbox purchases drive your whole test-mode referral loop without touching live data or billing.

Identity: the one convention

Invitebase resolves Adapty events to users by matching Adapty's customer_user_id against the user ID you pass to identify():

Invitebase.identify(user.id)                 // must be the same value…
try await Adapty.identify(user.id)           // …as your Adapty customer user ID

Events for users Invitebase has not seen yet are parked and retried once the user is identified, so a purchase racing the signup event is not lost. Events with no customer_user_id (anonymous Adapty profiles) cannot be matched — identify referred users before the purchase moment.

Event mapping

Adapty webhook events map to canonical Invitebase events — the same vocabulary the RevenueCat adapter emits, so campaigns are portable between providers:

Adapty eventInvitebase eventNotes
subscription_startedsubscription_startedCarries plan: "paid"
trial_startedtrial_started
trial_convertedtrial_converted + subscription_startedThe trial-conversion moment
subscription_renewedsubscription_renewed
non_subscription_purchasepurchase_completedOne-time purchases
subscription_cancelledsubscription_cancelledAuto-renew disabled
subscription_expiredsubscription_expired
subscription_refundedsubscription_refundedFeeds fraud holds and clawbacks

Mapped events carry product_id, store, price, currency, and plan properties you can restrict gate conditions by. Every mapped event is visible in Developer tools → Events with the raw Adapty payload attached, and source: adapty on the API.

Use it in a gate

To validate when the referred user starts a paid subscription, add one required condition on subscription_started in the gate builder, restricted to plan: paid, with a 14-day window.

Gate on trial_converted for trial-based funnels. Refund events are wired into fraud controls so refunds inside the hold window can claw back rewards before payout. Full walkthrough: Reward on paid subscription.

Test with the Adapty sandbox

  1. Set up a linked test referral (see the test-mode walkthrough).
  2. In a development build, sign in as the referred test user and make a sandbox purchase.
  3. Adapty fires the webhook; Invitebase maps it into test mode and the gate evaluates within seconds.
  4. Watch the referral flip to validated in the dashboard.

Alternatively, fire a synthetic purchase from Developer tools → Events → Simulate against any test-mode user.

What's next

On this page