Documentation

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 eventAppSprint event
INITIAL_PURCHASEpurchase
RENEWALrenewal
CANCELLATIONcancellation
UNCANCELLATIONuncancellation
NON_RENEWING_PURCHASEpurchase
SUBSCRIPTION_PAUSEDsubscription_paused
EXPIRATIONexpiration
BILLING_ISSUEbilling_issue
PRODUCT_CHANGEproduct_change

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/webhooks/revenuecat

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 });
}