Before you start
- RevenueCat V1 API key available (Project Settings → API Keys → Secret keys).
- AppsFlyer V2.0 API token available (AppsFlyer → My Profile → API Token).
- RevenueCat
app_user_idis explicitly set to your backend user ID — not an auto-generated RevenueCat anonymous ID. - The same backend user ID is sent to AppsFlyer as
customer_user_id.
Steps
Connect RevenueCat
Go to FloKit → Settings → Integrations → RevenueCat.Enter your Secret API key (starts with
sk_). FloKit uses this to pull subscription history via the RevenueCat REST API.Enable the RevenueCat webhook (recommended):
In RevenueCat, go to Project Settings → Webhooks → Add Webhook.- URL:
https://api.flokit.ai/v1/integrations/revenuecat/webhook - Events: select Initial Purchase, Renewal, Cancellation, Expiration, Trial Started, Trial Converted, Refund.
Connect AppsFlyer
Go to FloKit → Settings → Integrations → AppsFlyer.Enter:
- API token — your AppsFlyer V2.0 API token.
- App ID — your App Store app ID (numeric, e.g.
1234567890). Include theidprefix if prompted.
customer_user_id.Verify identity join
Go to FloKit → Data → Identity.FloKit joins RevenueCat
app_user_id to AppsFlyer customer_user_id. The join rate should be above 90%.The most common integration issue with RevenueCat + AppsFlyer is a user ID mismatch. RevenueCat generates a random $RCAnonymousID if you don’t call logIn() or configure() with an explicit appUserID. AppsFlyer uses customer_user_id, which must be set via setCustomerUserId(). If these are not the same backend user ID, FloKit cannot match subscription events to attribution data.To diagnose:- In RevenueCat → Customer Lookup, find a test user and check their
app_user_id. If it starts with$RCAnonymousID, explicit user ID is not being set. - In AppsFlyer → Raw Data Reports, check whether
customer_user_idis populated for your installs.
Wait for historical backfill
FloKit begins a historical backfill immediately after both integrations are connected. Backfill covers the past 90 days by default and completes within 2–4 hours.Monitor progress at FloKit → Data → Sources.
Validate the payback report
Go to Reports → Payback. Set the date range to the past 30 days.Cross-check against your existing reporting:
- CAC: compare to your internal CAC figure for the same period. Expected tolerance: ±5%.
- Trial conversion rate: compare to RevenueCat → Charts → Trial Conversion. Expected tolerance: ±2%.
- Renewal rate: compare to RevenueCat → Charts → Subscriber Retention. Expected tolerance: ±2%.
Validation checklist
- RevenueCat API key accepted, historical backfill complete
- AppsFlyer API token accepted, attribution data visible
- Identity join rate above 90%
- No
$RCAnonymousIDentries visible in FloKit → Data → Identity - CAC within ±5% of your existing report
- Trial conversion within ±2% of RevenueCat dashboard
Troubleshooting
Join rate is low The most likely cause is anonymous RevenueCat user IDs. Check RevenueCat → Customer Lookup for$RCAnonymousID entries. Resolve by ensuring logIn() or configure(appUserID:) is called with your backend user ID immediately after authentication. See Identity mapping.
Attribution data is missing for some installs
AppsFlyer customer_user_id may not be set at install time if the user hasn’t authenticated yet. If your app authenticates users after install (typical), you may need a server-side identity resolution step. See Identity mapping.
RevenueCat webhook events not arriving
Verify the webhook URL in RevenueCat matches exactly: https://api.flokit.ai/v1/integrations/revenuecat/webhook. Check FloKit → Data → Sources → RevenueCat → Webhook log for delivery status.