RevenueCat
Forward RevenueCat webhook events to Postback so every subscription and purchase is attributed to the install that triggered it. Setup takes about 10 minutes.
Requirements
- The Postback SDK installed and configured in your app.
- A RevenueCat account with admin access to add a webhook.
- Your Postback RevenueCat webhook token (Dashboard → Integrations → RevenueCat).
Event mapping
| RevenueCat event | Postback 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 Postback 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.postback.sh/v1/integrations/revenuecat/webhooks/{appId}
Replace {appId} with your Postback app ID. The dashboard integration page shows the full URL for the selected app.
Postback marks the integration verified after the first valid webhook. Sandbox webhooks can verify the connection, but Postback 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 Postback under Integrations → RevenueCat).
Authorization: Bearer rc_whsec_xxxxxxxx
Set the postbackId subscriber attribute
For webhooks to be matched to an attribution, set the postbackId subscriber attribute in RevenueCat from the SDK. This links the RevenueCat subscriber to the Postback install.
Set the attribute after Postback is configured. In React Native and Flutter, await the install ID before calling RevenueCat:
import { Postback } from 'postback-react-native';import Purchases from 'react-native-purchases';const postbackId = await Postback.getPostbackId();if (postbackId) {await Purchases.setAttributes({ postbackId });}