Skip to main content

Identify the subscriber

Register each device with POST /v2/auth/device and read the user_id from the response. Backapp matches this ID only among users of the app assigned to the webhook endpoint. Register the device Call Purchases.logIn(user_id) before purchase or restore to use the Backapp user ID as the RevenueCat App User ID. Backapp looks for it in the event’s app_user_id, original_app_user_id, and aliases.

Keep your existing RevenueCat App User ID

If your app needs to keep its own RevenueCat App User ID, such as an email address, set the backapp_user_id subscriber attribute on the signed-in RevenueCat customer before purchase. On each device, use the user_id returned for that device as userId below. Existing subscribers. RevenueCat does not replay historical events. After the updated app sets the attribute, Backapp shows the subscription when it receives the next event that grants or renews access, such as RENEWAL.

Multiple devices and account changes

Once Backapp has matched a customer’s devices through webhook events, they share subscription access. For example, if a purchase links a phone and a later renewal links a tablet, both devices have access. An expiration event ends access on both. If someone signs in to a different RevenueCat account on one device, that device stops following the previous account after Backapp receives the first event linking it to the new account.

Connect the webhook

  1. Ask the Backapp team for the RevenueCat endpoint URL and authorization secret for your app and environment. The URL ends in /v2/webhooks/revenuecat/{public_id}. This ID identifies the webhook endpoint. Use the assigned URL for all subscribers in the app.
  2. In your RevenueCat project, open Integrations → Webhooks and add a configuration. Select the matching app and environment, enter the assigned URL, and paste the Backapp whs_ secret into the Authorization field. Save the configuration. Starting with release bf55ff2, a new endpoint accepts deliveries with the correct Authorization value alone. Send a TEST event to verify the connection. The earlier release f14ad43 requires HMAC signing for every RevenueCat endpoint.

Enable HMAC signing (optional)

After saving the webhook, enable HMAC webhook signing in RevenueCat. Have the Backapp administrator save the key RevenueCat generates in the endpoint’s Signing secret field. From then on, every delivery must include both the authorization secret and a valid signature. Send another TEST event to verify the signed configuration. RevenueCat webhook setup

Verify delivery and subscription state

For a TEST event, HTTP 200 with {"ok":true} confirms delivery. To verify the subscription itself, make a sandbox purchase with the identified user and read GET /v2/me for the same Backapp app and user. Check subscription.is_active and subscription.product_id. Read subscription status If delivery returns HTTP 401, check the endpoint URL and authorization secret. If the endpoint has a signing secret configured, also check that RevenueCat signing is enabled, the keys match, and the signature timestamp is within five minutes of Backapp’s clock. If delivery succeeds but the subscription is missing, check the selected app and confirm the event contains the expected Backapp user ID in the RevenueCat identity fields or the backapp_user_id subscriber attribute. Backapp records an unmatched event without applying it to a subscription.

How events affect access

For events that grant access, period_type: TRIAL sets is_trial to true. Backapp deduplicates deliveries by event ID within the app and source. An event with an older timestamp cannot overwrite a newer subscription update.