Docs menu
Docs/RevenueCat

RevenueCat integration setup

Use a RevenueCat webhook to send purchases, renewals, refunds and billing issues into Metrivo. Payment attribution stays confidence-labeled and does not invent matches.

RevenueCat does not sign its payloads. It sends an Authorization header value that you choose, and Metrivo compares it with the secret you save. That authenticates the sender; it is not a payload signature and there is no independent reconciliation, so RevenueCat is shown as authenticated webhook evidence.

Shared-secret authorization header

Choose a long random string, save it in Metrivo, and enter the same value as the Authorization header in your RevenueCat webhook settings. It is encrypted before storage and never rendered back after save. Metrivo compares it in constant time on every delivery.

Setup steps

  1. 1. Open Metrivo Data Connections and generate the RevenueCat webhook URL.
  2. 2. Choose a long random secret and save it in Metrivo.
  3. 3. In RevenueCat, open Integrations → Webhooks, paste the Metrivo URL and enter the same secret as the Authorization header value.
  4. 4. Choose whether to send production events, sandbox events or both. Sandbox events are ignored when the Metrivo integration is in live mode.
  5. 5. Send a test event, then make a purchase. Metrivo marks the provider active only after a paid purchase event is accepted; a test event alone does not.

RevenueCat retries a failed delivery up to five times over about 80 minutes and reuses the same event id, so a retry never creates a second payment.

Metadata for attribution

RevenueCat events carry subscriber attributes. Set the Metrivo identifiers as attributes before the purchase and they arrive with every purchase and renewal. Set the $email attribute to allow an email-hash match. Attributes that begin with $ are not stored as attribution metadata.

// In your app or web checkout, before the purchase
const metadata = window.Metrivo?.getAttributionMetadata?.() || {}

await Purchases.setAttributes({
  ...metadata, // metrivo_visitor_id, metrivo_session_id
  $email: "customer@example.com",
})

How Metrivo reads RevenueCat events

  • INITIAL_PURCHASE, RENEWAL, NON_RENEWING_PURCHASE record revenue, using price_in_purchased_currency in the event's currency. A zero-price event such as a free trial is not revenue.
  • CANCELLATION is a refund only when its price is negative. Then it updates the existing payment instead of creating a new row. A plain cancellation moves no money.
  • BILLING_ISSUE is recorded as a failed payment. RevenueCat reports a zero price for it, so the amount at risk is shown as unknown rather than guessed.
  • Other events such as EXPIRATION and PRODUCT_CHANGE are stored as lifecycle evidence and carry no money.
  • Store purchases arrive without a subscription cadence, so Metrivo records the payment but does not infer recurring revenue from it.

Contract read from the RevenueCat documentation, checked 2026-10-28.