Connect
1
Open the source
Open Sources, find RevenueCat, and select connect.
2
Enter your Project ID
Paste the RevenueCat project ID (it starts with
proj).3
Enter your store app IDs
For iOS, add the bundle ID, the App Store ID (the number in your App Store URL), and
the iOS app’s RevenueCat app ID. For Android, add the package name and the Android
app’s RevenueCat app ID. RevenueCat app IDs start with
app and are listed under
Apps & providers in RevenueCat.RevenueCat’s webhook names the RevenueCat app, not the bundle ID or package. We label
events with your store app IDs only when they come from the RevenueCat app you
entered, so another app in the same project is never mistaken for this one. Without
these, conversion rules limited to mobile events on Meta, TikTok, and Snapchat skip
every RevenueCat purchase, because we can’t confirm which app it came from.
4
Enter a webhook secret
Any strong random string works. You’ll paste the same value into RevenueCat next.
Deliveries return HTTP 503 until a secret is stored.
5
Copy the webhook URL
6
Add the webhook in RevenueCat
In Project Settings → Integrations, paste the URL. Set the
Authorization header
to your secret. A Bearer prefix is fine either way.Link purchases to the app install
Each subscriber must be linked to the SDK install that made the purchase. Without the link, the revenue has no campaign to credit, and App Store purchases can’t be sent to Meta or Snapchat as app events with the install’s device context.
Set
datalyr_id in every app. Binding is an extra link for campaign credit. Use iOS SDK
2.1.16 or React Native SDK 1.7.21, or later.
Set datalyr_id before the paywall
Set datalyr_id, and call identify() if the user has signed in, before you show the
paywall. A purchase made before you set datalyr_id reaches DATALYR without it, and
DATALYR cannot link it to the install.
Register the attributes once with syncRevenueCatAttributes (iOS 2.1.19, React Native
1.8.0, or later):
datalyr_id to the previous subscriber.
Set the attributes yourself (older SDKs)
getRevenueCatAttributes() sets the datalyr_id subscriber attribute to the SDK’s
anonymous ID, plus the stored attribution and device identifiers. To set only the ID:
Purchases.logIn, after reset(), and
after the App Tracking Transparency prompt.
Bind the RevenueCat user ID
We resolve the visitor in this order, stopping at the first match:
No match sets
visitor_id to revenuecat_<original_app_user_id>. An event with no app user
ID falls back to revenuecat_<original_transaction_id>, so unmatched buyers never merge
into one person.
Event mapping
Twelve RevenueCat types produce fifteen DATALYR events. Three types split on a payload field.
RevenueCat doesn’t have a refund type of its own. A granted refund shows up as
CANCELLATION with cancel_reason set to CUSTOMER_SUPPORT, so that’s what we map.
TEST events and unknown types return 200 and record nothing.
Revenue
Six events carry revenue:subscription_started, trial_converted,
subscription_renewed, purchase, refund_reversed, refund. All others record 0,
including trial_started.
The event value is gross, before tax and store commission. Net is stored as
event_data.net_revenue:
commission_percentage falls back to 0.30 when RevenueCat omits it. Refunds always come
through negative, whatever sign RevenueCat sends.
In reports, gross revenue and transaction counts include charges only. Refunds are
reported on their own as Refunds and Refunded (net of reversed refunds), the same
way Superwall’s are.
Top-level
currency is always USD, because RevenueCat converts before it sends. The
original values stay available as event_data.original_currency and
event_data.original_price, but build your conversion rules on the USD value.Fields for conversion rules
Every other RevenueCat field is kept in
event_data unchanged.
Delivery behavior
If you connect both RevenueCat and Superwall, one is your revenue source and the other
is recorded at $0, so revenue is counted once. RevenueCat is the default. Change it in
Settings → General → Mobile revenue authority, which appears once both are connected.
Verify
- Send RevenueCat’s test event. Confirm it returns 200.
- Complete a sandbox purchase in your app.
- Open Events and find the event.
- Confirm the event name,
value,product_id, andapp_user_id. - Confirm
visitor_iddoesn’t start withrevenuecat_.
When it doesn’t work
Next, create a conversion rule so these purchases reach your ad
platforms.