AppsFlyer Event Delivery Reference
Example AppsFlyer event delivery requests and RevenueCat source mapping
Use this page as a reference for the event delivery requests RevenueCat sends to AppsFlyer. AppsFlyer event delivery can use different provider paths for mobile purchases, web purchases, and App-to-Web flows. For setup steps, see AppsFlyer.
| Delivery path | Delivery behavior | Required identifiers |
|---|---|---|
| Mobile S2S | Sends mobile purchase events to an AppsFlyer app. | $appsflyerId customer attribute, sent as appsflyer_id. |
| Web S2S API | Sends web purchase events through AppsFlyer's Web S2S API. | Web SDK ID. $appsflyerId isn't required. |
| Web PBA API | Sends web purchase events through AppsFlyer's Web PBA API. | Web PBA bundle ID. $appsflyerId isn't required. |
Example event delivery requests
RevenueCat chooses the AppsFlyer delivery path based on the purchase source and the integration's AppsFlyer configuration.
Example Mobile S2S request
{
"headers": {
"authentication": "<developer_key>"
},
"body": {
"customer_user_id": "<app_user_id>",
"appsflyer_id": "<appsflyer_id>",
"eventName": "<configured_event_name>",
"eventTime": "<event_time>",
"eventValue": "{\"af_revenue\":\"<usd_revenue>\",\"af_price\":<usd_product_price>,\"renewal\":\"<is_renewal>\",\"af_content_id\":\"<product_id>\",\"af_currency\":\"USD\"}",
"eventCurrency": "USD",
"af_events_api": "true",
"idfa": "<idfa>",
"advertising_id": "<google_advertising_id>",
"amazon_aid": "<amazon_advertising_id>",
"idfv": "<idfv>",
"ip": "<ip_address>"
}
}
If Key is a S2S token is enabled, RevenueCat uses https://api3.appsflyer.com/inappevent/<appsflyer_app_id> instead.
Example Web S2S API request
{
"headers": {
"Authorization": "Bearer <web_s2s_api_token>"
},
"body": {
"user_id": {
"customer_user_id": "<app_user_id>"
},
"event_name": "<configured_event_name>",
"event_revenue": <usd_revenue>,
"event_revenue_currency": "USD",
"event_value": {
"af_content_id": "<product_id>",
"renewal": "<is_renewal>",
"store": "<store>",
"af_order_id": "<transaction_id>"
},
"customer_dedup_id": "<revenuecat_integration_event_id>",
"timestamp": <event_timestamp_ms>,
"ip": "<ip_address>"
}
}
Example Web PBA API request
{
"body": {
"customerUserId": "<app_user_id>",
"webDevKey": "<web_pba_dev_key>",
"eventType": "EVENT",
"eventName": "<configured_event_name>",
"eventRevenue": <usd_revenue>,
"eventRevenueCurrency": "USD",
"eventValue": {
"af_revenue": "<usd_revenue>",
"af_price": <usd_product_price>,
"renewal": "<is_renewal>",
"af_content_id": "<product_id>",
"af_currency": "USD",
"af_order_id": "<transaction_id>"
},
"timestamp": <event_timestamp_ms>,
"ip": "<ip_address>"
}
}
RevenueCat source to AppsFlyer request mapping
The table below covers fields shared by AppsFlyer delivery paths unless noted.
| AppsFlyer request element | RevenueCat source and behavior |
|---|---|
| Endpoint | Sends POST requests using Mobile S2S, Web S2S, or Web PBA based on the purchase source and AppsFlyer web store event routing setting. |
| Credentials | Mobile S2S sends the configured developer key or S2S token in the authentication header. Web S2S sends the configured API token in the Authorization header. Web PBA sends the configured web dev key as webDevKey in the request body. |
customer_user_id, user_id.customer_user_id, customerUserId | Sends the RevenueCat app user ID. The field name depends on the delivery path. |
appsflyer_id | Mobile S2S requires the $appsflyerId customer attribute and sends it as appsflyer_id. Web S2S and Web PBA don't require $appsflyerId. |
eventName, event_name | Sends the configured RevenueCat event name or the default AppsFlyer event name. Mobile and Web PBA use eventName; Web S2S uses event_name. |
eventValue, eventCurrency, event_revenue, event_revenue_currency, eventRevenue, eventRevenueCurrency | Sends USD revenue according to the configured Sales Reporting mode. Mobile S2S places USD revenue in the JSON-encoded eventValue string and sends eventCurrency: "USD". Web S2S uses event_revenue with event_revenue_currency: "USD". Web PBA uses eventRevenue with eventRevenueCurrency: "USD". |
eventValue.af_content_id, event_value.af_content_id, eventValue.af_order_id, event_value.af_order_id | Sends product identifiers as af_content_id. When RevenueCat includes a transaction ID, it can be sent as af_order_id. |
event_value.store | Web S2S includes the purchase store in event_value.store. Mobile S2S and Web PBA don't include this store field. |
idfa, advertising_id, amazon_aid, idfv, ip | Mobile S2S sends IDFA, Google Advertising ID, Amazon Advertising ID, IDFV, and IP address when available. Web S2S and Web PBA can include IP address when available. |
sharing_filter | Mobile S2S uses $appsflyerSharingFilter to block sharing with selected AppsFlyer partners when configured. |
Was this page helpful?