RevenueCat
Forward RevenueCat webhook events to AppSprint so every subscription and purchase is attributed to the install that triggered it. Setup takes about 10 minutes.
Requirements
- The AppSprint SDK installed and configured in your app.
- A RevenueCat account with admin access to add a webhook.
- Your AppSprint RevenueCat webhook token (Dashboard → Integrations → RevenueCat).
Event mapping
| RevenueCat event | AppSprint event |
|---|---|
| INITIAL_PURCHASE | purchase |
| INITIAL_PURCHASE + period_type=TRIAL | start_trial |
| RENEWAL, including is_trial_conversion=true | subscribe |
| UNCANCELLATION | purchase |
| NON_RENEWING_PURCHASE | purchase |
| CANCELLATION / EXPIRATION / BILLING_ISSUE / PRODUCT_CHANGE / SUBSCRIPTION_PAUSED / TRANSFER / REFUND_REVERSED | custom |
Custom lifecycle events keep the raw RevenueCat type in the event name, for example revenuecat:cancellation. Other RevenueCat event types are stored as webhook receipts but ignored for AppSprint event attribution.
Add the webhook to RevenueCat
In RevenueCat, go to Project Settings → Integrations → Webhooks and add a new webhook with this URL:
https://api.appsprint.app/v1/integrations/revenuecat/webhooks/{appId}
Replace {appId} with your AppSprint app ID. The dashboard integration page shows the full URL for the selected app.
AppSprint marks the integration verified after the first valid webhook. Sandbox webhooks can verify the connection, but AppSprint does not create attributed events or outbound ad conversions from environment=SANDBOX deliveries.
Set the Authorization header
Set the Authorization header to a Bearer token matching your app's revenuecatWebhookToken (found in AppSprint under Integrations → RevenueCat).
Authorization: Bearer rc_whsec_xxxxxxxx
Set the appsprintId subscriber attribute
For webhooks to be matched to an attribution, set the appsprintId subscriber attribute in RevenueCat from the SDK. This links the RevenueCat subscriber to the AppSprint install.
Set the attribute after AppSprint is configured. In React Native and Flutter, await the install ID before calling RevenueCat:
import { AppSprint } from 'appsprint-react-native';import Purchases from 'react-native-purchases';const appsprintId = await AppSprint.getAppSprintId();if (appsprintId) {await Purchases.setAttributes({ appsprintId });}