Documentation

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 eventPostback event
INITIAL_PURCHASEpurchase
INITIAL_PURCHASE + period_type=TRIALstart_trial
RENEWAL, including is_trial_conversion=truesubscribe
UNCANCELLATIONpurchase
NON_RENEWING_PURCHASEpurchase
PAYWALL_IMPRESSIONcustom: revenuecat:paywall_viewed
PAYWALL_CLOSEcustom: revenuecat:paywall_closed
PAYWALL_CANCELcustom: revenuecat:checkout_cancelled
PAYWALL_COMPONENT_INTERACTED + component_type=purchase_buttoncustom: revenuecat:checkout_started
CANCELLATION / EXPIRATION / BILLING_ISSUE / PRODUCT_CHANGE / SUBSCRIPTION_PAUSED / TRANSFER / REFUND_REVERSEDcustom

Custom lifecycle events keep the raw RevenueCat type in the event name, for example revenuecat:cancellation. Postback keeps purchase-button interactions but ignores other component interactions and exit-offer details so high-volume UI noise does not inflate event usage. 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.

Set the event filter to All types, enable Paywall events, and keep the default Paywall event names. Postback recognizes RevenueCat's default event names.

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.

Paywall UI events are available only for paywalls rendered by RevenueCat. Subscription lifecycle events continue to work for purchases managed by RevenueCat even when another tool renders the paywall.

Use one subscription lifecycle webhook as the source of truth for each app. If RevenueCat manages purchases, keep this webhook and do not also connect Superwall's lifecycle webhook for the same transactions.

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 and sync the postbackId attribute

For webhooks to be matched to an attribution, set the postbackId subscriber attribute in RevenueCat from the SDK. Set it before showing a paywall or starting a purchase so the lifecycle webhook can link the RevenueCat subscriber to the Postback install.

Set the attribute after Postback is configured. In React Native and Flutter, await the install ID and explicitly sync the attribute 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 });
await Purchases.syncAttributesAndOfferingsIfNeeded();
}