Outbound Webhooks
Receive Rovenue subscription, revenue, funnel, and credit-ledger events on your own HTTPS endpoint — payload shape, signature verification, retries, and idempotency.
Outbound Webhooks
The Custom Webhook integration POSTs a JSON event to an HTTPS endpoint you control whenever a subscription, revenue, funnel-session, or credit-ledger event happens in your project. It is signed with the same scheme Svix uses, so most existing Svix-compatible webhook libraries verify it without modification.
1. Add a webhook endpoint
- In the Rovenue dashboard, navigate to Apps (left sidebar).
- Find Custom Webhook in the integrations grid and click it.
- Enter your endpoint URL (must be
https://in production) and choose which events to receive. - Click Save. The response includes a signing secret in the form
whsec_...— copy it now. It is shown once, at creation time; Rovenue only stores it encrypted and later shows a truncated hint (e.g.example.com · …ab12). - Use the Delivery Log on the connection to inspect past attempts, HTTP status codes, and response bodies, and to manually redeliver a specific past event.
2. Payload envelope
Every delivery body is JSON with this shape:
{
"id": "cksubEvt1a2b3c4d5e6f7g8h9",
"type": "revenue.RENEWAL",
"created": "2026-08-24T12:00:00.000Z",
"apiVersion": "2026-08-24",
"projectId": "ckprojectAbCdEfGhIjKlMn",
"environment": "PRODUCTION",
"data": { }
}| Field | Description |
|---|---|
id | The originating event's stable identifier. Use this for idempotency — see below for how it behaves on retries and manual redeliver. |
type | One of the event keys below. |
created | ISO-8601 timestamp of when the underlying event occurred (not when it was delivered). |
apiVersion | A date-versioned string identifying the payload schema, currently 2026-08-24. Bump only accompanies a documented breaking change to the envelope or data shape. |
projectId | The Rovenue project the event belongs to. |
environment | "PRODUCTION", "SANDBOX", or null. The environment of the purchase behind the event (the store decides it: TestFlight, Google Play license testers and Stripe test mode are SANDBOX), or of the API key that sent it. null means Rovenue could not work it out: never book a null event as production revenue. See sandbox events. |
data | Event-specific payload — see below. |
Sandbox events
Every event carries its environment, on every event type: revenue.*, subscription.*, credit.ledger.appended, funnel.session.*, funnel.upsell.* and funnel.retention.*. A subscription.* event takes the environment of the purchase it is about; a credit.ledger.appended event the environment of its ledger row (the purchase that granted it, the secret key that spent or granted it, or the environment switch of a dashboard grant).
Webhook endpoints receive sandbox events by default, labelled "environment": "SANDBOX", so you can test your receiver with TestFlight or Stripe test-mode purchases. To stop them, turn off Deliver sandbox events in the connection's Activate step. Each sandbox event held back then appears in the Delivery Log as skipped with the reason sandbox_event. An event whose environment is null is held back with them.
Ad, attribution and analytics destinations (Meta, TikTok, AppsFlyer, Adjust, Singular, Airbridge, Google Analytics, Amplitude, Mixpanel, Braze, Iterable, OneSignal) work the other way round: their Send sandbox events switch is off by default, so test purchases never reach them as real conversions. Slack and Discord deliver sandbox events by default with a [Sandbox] prefix. Every connection logs the events it held back the same way.
data shape
For revenue events (revenue.*), data is a fixed shape:
{
"kind": "RENEWAL",
"amount": "9.99",
"currency": "USD",
"subscriberId": "cksubscriber1a2b3c4d5e6f7g",
"productId": "com.example.app.monthly",
"externalId": "cksubscriber1a2b3c4d5e6f7g",
"appUserId": "your-app-user-id",
"rovenueId": "8f3c2a9e-device-install-id",
"survivorSubscriberId": "cksubscriber1a2b3c4d5e6f7g",
"aliases": ["your-app-user-id"]
}amountis a decimal string in the major currency unit (e.g."9.99", not cents).currencyis the ISO 4217 code.appUserIdis your user id: the label you passed toidentify(or the S2S routes). It isnullwhile the user is anonymous. See mapping a webhook to your user.rovenueIdis the Rovenue id of the subscriber the event was recorded on. For an event from your app it is the install id the SDK exposes on the device. It is not always an install id: a buyer Rovenue recorded before any device was tied to them (a web funnel purchase not yet claimed in the app, or a store notification that arrived before the app's receipt) has a server-minted id starting withsrv_. Never treatrovenueIdas proof of a device.survivorSubscriberIdis the Rovenue subscriber id of the customer the event's subscriber belongs to now: the same assubscriberId, or, when that subscriber has since been merged into another one, the surviving subscriber's id.aliaseslists the surviving customer's app user ids: its currentappUserIdfirst, then the app user ids of accounts merged into it (newest first), at most 20. It never contains device ids or store identifiers. An app user id that a later, different customer has taken over is left out.externalIdis the Rovenue subscriber id, the same value assubscriberId. It is kept for compatibility (it is the match key Rovenue sends ad platforms). It is not your app user id: useappUserId. No other PII (email, phone, IP, etc.) is ever included in a webhook payload.reasonis present only on somerevenue.REACTIVATIONevents — see one-time purchase revenue keys below. Every other revenue event omits the key entirely rather than sending it asnull.- The shape above is the whole revenue body. Internally a revenue event also carries chart dimensions —
billingPeriod,offerId,offerType,audienceIds,targetingAudienceIdandchainId(the Charts page's Product duration, Offer, Offer type, Audience, Targeting rule and Renewal cycle;chainIdis an opaque hash of the purchase chain) — and Rovenue keeps them on the stored row under an internalchartDimsmetadata key. None of them is sent to a webhook or to any other destination: only the keys listed here are. They are not shown raw in the dashboard's transaction details or in a data export (GDPR/KVKK) either.
For every other event type (subscription.*, subscriber.* and credit.ledger.appended), data is that event's domain payload passed through, plus appUserId, rovenueId, survivorSubscriberId and aliases whenever it names a subscriberId. credit.ledger.appended also carries currencyCode (for example "GOLD") beside currencyId, and source, which says what wrote the ledger row:
{
"creditLedgerId": "ckledger1a2b3c4d5e6f7g8h9",
"projectId": "ckprojectAbCdEfGhIjKlMn",
"subscriberId": "cksubscriber1a2b3c4d5e6f7g",
"currencyId": "ckcurrency1a2b3c4d5e6f7g8",
"type": "BONUS",
"amount": 7,
"balance": 107,
"referenceType": null,
"referenceId": null,
"createdAt": "2026-10-14T12:00:00.000Z",
"source": "dashboard",
"appUserId": "your-app-user-id",
"rovenueId": "8f3c2a9e-device-install-id",
"currencyCode": "GOLD"
}source | The row was written by |
|---|---|
store_purchase | A store or Stripe purchase that grants currency through the product's grant rules. |
server_api | A secret-key /v1/virtual-currencies call: a grant, a spend, or a spend reversal. |
dashboard | A manual grant in the dashboard. |
transfer | An account merge (identify into an existing user, or POST /v1/subscribers/transfer) moving the balance: TRANSFER_OUT on the merged-away subscriber, TRANSFER_IN on the survivor. |
refund | A store refund clawing back granted currency, or the clawback being restored when the refund is reversed. |
periodic | A periodic ("Every N days") grant drip. A refund clawback of it is refund. |
expiration | Unused credits from an expiring subscription grant written off (type: "EXPIRE", referenceType: "credit_expiration", referenceId = the grant's ledger row id), at the period end or when the next grant of the same subscription lands. |
other | Anything else. Treat unknown values as other: new values may be added. |
(subscriber.identified is listed in the catalog, but no event of that type is sent today.)
For funnel events (funnel.session.*), data is a curated, camelCase object — not a passthrough of the internal payload. A field that has no value for that event (an empty native sessionId, a web event's missing placementId) is omitted entirely, never sent as null or "" (the one exception is appUserId, below):
{
"sessionId": "cksession1a2b3c4d5e6f7g8h",
"funnelId": "ckfunnel1a2b3c4d5e6f7g8h9i",
"versionId": "ckversion1a2b3c4d5e6f7g8h",
"target": "web",
"pageId": "welcome"
}{
"funnelId": "ckfunnel1a2b3c4d5e6f7g8h9i",
"revision": 2,
"target": "native",
"pageId": "onboarding-2",
"placementId": "ckplacement1a2b3c4d5e6f7g",
"variantId": "ckvariant1a2b3c4d5e6f7g8h",
"experimentKey": "onboarding-copy-test"
}{
"sessionId": "cksession1a2b3c4d5e6f7g8h",
"funnelId": "ckfunnel1a2b3c4d5e6f7g8h9i",
"versionId": "ckversion1a2b3c4d5e6f7g8h",
"target": "web",
"pageId": "pricing",
"actionId": "open_faq",
"params": {
"faqId": "refunds",
"source": "sticky-footer"
}
}A web event never carries revision (only native events do), and carries subscriberId on funnel.session.completed only: that is the event fired when a paid visitor claims the purchase in the app, so it is the first point where a web session has a subscriber. started, advanced, paid, abandoned, custom_action, lead_captured and checkout_started never have one.
A native event has no sessionId, because the device has no presentation id (see the note under funnel.session.dismissed below). It carries subscriberId whenever the device sent its Rovenue id with the event. Identifying is not required: every install has a Rovenue id, anonymous users included. The id on the webhook is the Rovenue subscriber id that the device's id resolved to. A GDPR-erased subject's events carry no subscriberId: they still arrive, but unattributed. Whenever a funnel event carries subscriberId, it also carries appUserId and rovenueId. appUserId is the one funnel field that can be sent as null: it is null when the user has not identified, so that "anonymous" stays distinguishable from "no subscriber". pageId is the page the event is about: the landing page of an arrival, the opening page of a started, or the page a custom action fired on; fromPageId (web-only, forward moves) names the page it moved from. funnel.session.paid carries no amount — money is always reported separately on the revenue.* keys above.
A web session that a web funnel A/B test assigned to an arm carries experiment on every funnel.session.* event, and funnel.session.paid carries trial (true when the purchase started a free trial). Both are omitted when they do not apply:
{
"sessionId": "cksession1a2b3c4d5e6f7g8h",
"funnelId": "ckfunnel1a2b3c4d5e6f7g8h9i",
"versionId": "ckversion1a2b3c4d5e6f7g8h",
"target": "web",
"experiment": { "key": "k7x2m9q4", "variantId": "annual-first" },
"trial": true
}experiment.variantId is legacy for a session opened by a previous-release runner during a rolling upgrade; such sessions are not counted in the results. The visitor id and the other assignment details are never sent.
params (only present on funnel.session.custom_action) is the author-defined key/value map attached to the action in the funnel document, and it is bounded before it reaches the wire — not a raw passthrough. In order: only string values survive (anything else is dropped); a key longer than 64 characters is dropped; the surviving keys are sorted and only the first 32 are kept (a deterministic cut, not "whichever happen to survive"); and each kept value is truncated to 512 characters. These bounds only make the body size predictable — a real action's params map is far smaller — but a receiver that expects every key it configured in the funnel to always be present should know keys can be silently dropped, and values silently truncated, under this rule.
Security note — native funnel events are client-asserted. A device funnel event (started, advanced, completed, dismissed) is submitted with the project's public SDK key, the same key that ships inside the app binary. Anyone holding that key — which is by design not a secret — can submit a native funnel event that never actually happened on a real device. Web funnel events (and every revenue.* event, including funnel.session.paid) are produced server-side and carry no such exposure. Do not treat a native funnel webhook as proof of anything a client could fake; if a receiver needs a trustworthy signal, use revenue.* or a web funnel event instead.
Upsell events
funnel.upsell.charged, funnel.upsell.failed and funnel.upsell.declined describe a one-click post-purchase offer in a web funnel: a page shown after the first purchase that charges the card saved at checkout without asking for it again. data is a curated camelCase object that never carries an amount: the charge's money arrives as its own revenue.* event. A field that does not apply is omitted:
| Field | Carried on | Meaning |
|---|---|---|
sessionId, funnelId, versionId | all three | The web session and the published funnel version that showed the offer. |
offerKey | all three | The offer, as <pageId>.<blockId>. |
packageIdentifier | all three | The package offered. |
kind, upsellPurchaseId | charged, failed | Whether the charge was one_time or a subscription, and the charge attempt. declined has neither: no charge was attempted. |
storeTransactionId | charged only | The Stripe id, for reconciliation: the PaymentIntent (pi_…) of a one_time charge, the subscription (sub_…) of a subscription add-on. |
reason | failed only | The card's decline code (insufficient_funds), else Stripe's failure code, else failed or canceled. |
experiment | all three, under an A/B test | The arm the session runs in, as on funnel.session.*. |
{
"sessionId": "cksession1a2b3c4d5e6f7g8h",
"funnelId": "ckfunnel1a2b3c4d5e6f7g8h9i",
"versionId": "ckversion1a2b3c4d5e6f7g8h",
"offerKey": "upsell-page.offer",
"packageIdentifier": "lifetime_addon",
"kind": "one_time",
"upsellPurchaseId": "ckupsell1a2b3c4d5e6f7g8h",
"storeTransactionId": "pi_3QabcDEF123"
}Retention events
funnel.retention.offer_accepted, funnel.retention.cancel_requested and funnel.retention.reactivated describe what a subscriber chose in a manage-subscription (retention) funnel: taking a pause, discount or free-period offer, cancelling, or undoing a cancel or pause. Each is sent once per action, after Stripe accepted the change. data is a curated camelCase object that never carries an amount and never carries free text — the survey answer arrives as its key, never what the subscriber typed. A discounted or free renewal arrives on revenue.* with its real (smaller or zero) amount; the Stripe-side state change arrives on subscription.*. A field that does not apply is omitted:
| Field | Carried on | Meaning |
|---|---|---|
sessionId, funnelId, versionId | all three | The manage session and the published funnel version it ran. |
subscriberId | all three | The Rovenue subscriber whose subscription changed. |
purchaseId | all three | The Rovenue purchase (the id the S2S manage-link call takes). |
storeTransactionId | all three | The Stripe subscription id (sub_…), for reconciliation. |
retentionKind | all three | pause, discount or free_period on offer_accepted; cancel on cancel_requested; reactivate on reactivated. |
retentionActionId | all three | The action, unique per subscriber choice. The same id is on the Stripe subscription's metadata. |
offerKey | offer_accepted | The offer the subscriber took, as <pageId>.<blockId>. |
reasonKey | when the subscriber answered the reason question | The answer's key (for example too_expensive). Omitted when there was no answer. |
{
"sessionId": "cksession1a2b3c4d5e6f7g8h",
"funnelId": "ckfunnel1a2b3c4d5e6f7g8h9i",
"versionId": "ckversion1a2b3c4d5e6f7g8h",
"subscriberId": "cksubscriber1a2b3c4d5e6f7",
"purchaseId": "ckpurchase1a2b3c4d5e6f7g8",
"storeTransactionId": "sub_1QabcDEF123",
"offerKey": "offers.pause",
"retentionKind": "pause",
"retentionActionId": "ckaction1a2b3c4d5e6f7g8h9",
"reasonKey": "too_expensive"
}The webhook id is the action's own id plus the event (<retentionActionId>:offer_accepted), so a redelivered event keeps its id. Showing an offer, skipping or declining it and a failed attempt are counted in the funnel's retention dashboard but never sent.
Experiment events
experiment.started, experiment.stopped and experiment.allocation_changed describe an experiment, not a subscriber or a purchase, so they carry no subscriberId and their environment is null. As with every null-environment event, a connection with Deliver sandbox events turned off holds them back. data is a curated camelCase object. Every key carries:
| Field | Meaning |
|---|---|
experimentId, experimentKey, experimentType | The experiment. |
surface | web_funnel for a web funnel A/B test, app for an experiment served to the SDK. |
controlFunnelId | The web experiment's control funnel; null for an app experiment. |
and, per key:
| Event key | Fields |
|---|---|
experiment.started | allocationRevision, weights ([{ variantId, weight }]), attributionWindowDays (web; null otherwise), auto (true when the scheduler started it) |
experiment.allocation_changed | allocationRevision (the new revision), weights, effectiveAt |
experiment.stopped | winnerVariantId (null when stopped without a winner), servedFunnelId (the funnel the address serves from now on; null for an app experiment), auto (true when the scheduler picked the winner), and, when the winner took the address, address (the slug) and retiredControlSlug (the control's new slug) |
{
"experimentId": "ckexperiment1a2b3c4d5e6f7",
"experimentKey": "k7x2m9q4",
"experimentType": "FUNNEL",
"surface": "web_funnel",
"controlFunnelId": "ckfunnel1a2b3c4d5e6f7g8h9i",
"winnerVariantId": "annual-first",
"servedFunnelId": "ckfunnel9z8y7x6w5v4u3t2s1r",
"auto": false,
"address": "pricing",
"retiredControlSlug": "pricing-control-1"
}Mapping a webhook to your user
appUserId and rovenueId are resolved when the webhook is delivered, not when the event happened. They are never stored in Rovenue's event stream.
- Anonymous user:
appUserIdisnull.rovenueIdidentifies the install. - Identified later: an automatic retry or a manual redeliver after
identifycarries the new label. - Merged accounts (identify into an existing user, a web purchase claimed in the app, a store receipt that joins a server-recorded buyer, or
POST /v1/subscribers/transfer): an event recorded on the merged-away subscriber carries the surviving account'sappUserId, its id assurvivorSubscriberId, and itsaliases.subscriberIdandrovenueIdstay those of the subscriber and install the event happened on. Every merge also sends onesubscriber.mergedevent (see the catalog). - Erased (GDPR/KVKK) user:
appUserId,rovenueId,survivorSubscriberIdandaliasesarenullon a live delivery. A redeliver or backfill sends the event with nosubscriberId,appUserIdorrovenueIdat all. The erased label is never sent. - Send test event uses the sample values
"test-app-user-id"and"test-rovenue-id"(withsurvivorSubscriberIdequal to itssubscriberIdandaliases["test-app-user-id"]).
These fields are additive: apiVersion stays 2026-08-24.
3. Event catalog
Kept in sync with
ROVENUE_EVENT_KEYSinpackages/shared/src/integrations.ts— that file is the source of truth if this list and the code ever drift.
| Event key | Fires when |
|---|---|
revenue.INITIAL | The first paid transaction for a subscriber (new subscription). Also the type recorded for any one-time purchase made before 2026-09-04 — see one-time purchase revenue keys below. |
revenue.TRIAL_CONVERSION | A trial converts to a paid subscription. |
revenue.RENEWAL | A recurring subscription renews for another billing period. |
revenue.CREDIT_PURCHASE | A consumable in-app product is purchased — Apple, Google, or a one-time Stripe funnel purchase of a consumable product. See one-time purchase revenue keys below. |
revenue.NON_RENEWING_PURCHASE | A non-consumable one-time purchase — Apple, Google, or a one-time Stripe funnel purchase of a non-consumable product. See one-time purchase revenue keys below. |
revenue.REACTIVATION | A lapsed subscriber returns — a win-back offer redemption or a plain resubscribe on any store — or an accounting reversal of a previously-applied refund (Apple, and Stripe when a refund fails or is canceled, or a dispute whose funds were withdrawn is won). All three stores — see one-time purchase revenue keys below for how the two cases are told apart internally. |
revenue.REFUND | A refund is recorded (data.amount is always a positive value). A Stripe dispute (chargeback) is recorded the same way when Stripe withdraws its funds or the dispute is lost: one row per dispute, whichever of charge.dispute.funds_withdrawn and charge.dispute.closed arrives first. |
revenue.CANCELLATION | The subscription ended — the $0 marker written when a subscription reaches its end of term. It books no money and grants no credits. Sent together with subscription.expired, on the store's confirmation — see when an end is announced. |
subscription.trial.started | A new trial period begins. |
subscriber.identified 1 | An SDK identify() call binds a Rovenue subscriber to your app-user id. |
subscriber.purchase_transferred | A restored or re-verified receipt moved a purchase from one subscriber to another, per the project's Handling multiple app user IDs setting, or because the previous owner was erased. data carries fromSubscriberId, toSubscriberId (also subscriberId), store, chain (the Apple originalTransactionId; for Google the first 24 characters of the purchaseToken, never the full token), purchaseIds, behavior and reason. reason is transfer_behavior for a move the setting decided, or previous_owner_erased when the chain's owner had been erased and the subscriber presenting the receipt took it over whatever the setting says; in that case fromSubscriberId and behavior are null, so the event never names the erased subscriber. Consumers must handle null in those two fields. History stays where it happened: revenue rows already recorded and credits already granted stay on the old subscriber. Every later event of that purchase (renewals, refunds, expiry, and the revenue and credits they bring) follows it to the new subscriber. |
subscriber.merged | One subscriber was merged into another: an identify() into an existing app user, a web funnel purchase claimed in the app, a store receipt that joins a buyer Rovenue recorded first, POST /v1/subscribers/transfer, a dashboard merge, or the identity release step after an upgrade. data carries fromSubscriberId (the merged-away subscriber), toSubscriberId (the survivor, also subscriberId), reason (IDENTIFY, FUNNEL_CLAIM, RECEIPT_MERGE, S2S_TRANSFER, COPILOT or RELEASE_STEP; RELEASE_STEP is the one-time identity backfill an operator runs after upgrading to the release that added customer identities: it merges the duplicate records the roll-out left for one store buyer into one), moved (purchases and access row counts, and creditsPerCurrency, a map of currency id to the balance moved) and at. The merged-away subscriber's ids keep working: GET /v1/subscribers/:id accepts any id the customer ever had, and the transfer source any current one (an app user id a merge retired answers 400 already transferred). |
subscription.cancel_requested | A subscriber requests cancellation (the subscription may still be active until period end). |
subscription.expired | A subscription ended at its end of term, as confirmed by the store — see when an end is announced. |
subscription.billing_issue | A renewal payment fails and the subscriber does not keep access while the store retries (Apple DID_FAIL_TO_RENEW without the GRACE_PERIOD subtype, Apple GRACE_PERIOD_EXPIRED, Google SUBSCRIPTION_ON_HOLD, Stripe invoice.payment_failed). The grace-period half of Apple's DID_FAIL_TO_RENEW announces subscription.grace_period instead — see the row below. |
subscription.grace_period | A renewal payment fails but the subscriber keeps access while the store retries (Google SUBSCRIPTION_IN_GRACE_PERIOD, Apple DID_FAIL_TO_RENEW with subtype GRACE_PERIOD — Apple sends that subtype only when the app has a billing grace period configured — and Stripe past_due while smart retries run). |
subscription.uncancelled | A subscriber re-enables auto-renew after previously cancelling (Google SUBSCRIPTION_RESTARTED, Apple DID_CHANGE_RENEWAL_STATUS in the "switched back on" direction, Stripe cancel-at-period-end undo). |
subscription.product_changed | A subscription's product or price changes outside a cancellation. Delivered in two phases: an announcement that a change is coming (Apple DID_CHANGE_RENEWAL_PREF other than its UPGRADE subtype, Google SUBSCRIPTION_DEFERRED — a price change on the same product is announced by the two price_increase keys below instead), and an effective delivery carrying data.phase = "effective" on Apple, Google and Stripe alike, when the product on the purchase actually moved. See plan-change phases below. |
subscription.paused | A subscriber pauses their subscription (Google SUBSCRIPTION_PAUSED, Stripe paused subscription). Apple has no pause. |
subscription.resumed | A paused subscription grants access again (Google restart/recovery from pause, Stripe pause end). Google and Stripe — Apple has no pause to resume from. |
subscription.recovered | A billing failure resolves and the subscription grants access again (Google SUBSCRIPTION_RECOVERED; on Apple and Stripe, any store write that moves a purchase out of BILLING_ISSUE into an access-granting state). All three stores — see the coverage note below. |
subscription.revoked | Access ends immediately rather than lapsing at end of term — a refund, a family-sharing removal, a store-initiated revocation (Apple REVOKE, Google SUBSCRIPTION_REVOKED), or a Stripe charge refund or dispute (funds withdrawn, or lost) that ends access mid-term. Distinct from subscription.expired, which is an end-of-term expiry. |
subscription.offer_redeemed | A subscriber redeems a promotional offer, an offer code, or a win-back offer (Apple OFFER_REDEEMED). Apple only — see the coverage note below. Distinct from subscription.uncancelled (the subscription may have fully lapsed) and from subscription.product_changed (the redeemed offer is often for the same product). |
subscription.price_increase_pending | The store announced a price increase the subscriber has not consented to yet (Apple PRICE_INCREASE subtype PENDING; Google price change OUTSTANDING, RTDN 19, or a price step-up consent period, RTDN 22). Apple and Google — see Price changes. data carries productId, currentPriceAmount / currentPriceCurrency (the row's price now), newPriceAmount / newPriceCurrency, mode (opt_in, opt_out or null when the store does not say), state and effectiveAt. Sent once per state: a redelivery or a repeat of the same state sends nothing. |
subscription.price_increase_accepted | The subscriber accepted a price increase, or the store notified them of one that needs no consent (Apple PRICE_INCREASE subtype ACCEPTED; Google price change CONFIRMED, step-up consent CONFIRMED). Same data as price_increase_pending. No key marks the increase being charged (the renewal's revenue.RENEWAL carries the new amount) or abandoned (subscription.expired with cancellation reason PRICE_INCREASE on Apple). |
credit.ledger.appended | A row is appended to the append-only credit ledger (a grant or a spend). data carries currencyCode, source and the subscriber's appUserId. |
experiment.started | An experiment starts running, by hand or on its schedule. See experiment events. |
experiment.stopped | An experiment stops, with or without a winner. For a web funnel A/B test whose winner is not the control, the winner has taken the address. |
experiment.allocation_changed | A running experiment's split changed: a new allocation revision begins. |
funnel.session.started | A funnel session begins — web (a visitor opens a funnel) or native (a device presents a funnel). |
funnel.session.advanced | A session arrives at a page, moving forward — web or native. A native session's first screen fires this too (there is no separate native "arrived at the opening screen" event, so its advanced count includes the first screen). |
funnel.session.paid | A purchase completes inside a web funnel. Web only today — carries no amount; see revenue.* above for money. |
funnel.session.completed | A session reaches the funnel's end — web or native. |
funnel.session.abandoned | A web session times out server-side with no further activity. Web only today — a native session has no equivalent server-side timeout; see dismissed below for how a device close is reported instead. |
funnel.session.dismissed | The user closes the funnel on the device. Native only — a device close is a different meaning from the web abandoned timeout above, so it is never sent for a web session. |
funnel.session.custom_action | An author-defined action fires inside a funnel page. Web only today. |
funnel.session.lead_captured | A web visitor submits the session's first email address. Sent once per session, never for a later email. Web only — the payload names no contact: no email and no hash. |
funnel.session.checkout_started | A web session's first payment object is created (one-time or subscription). Changing the package keeps the same checkout, so it is sent once. Web only — carries no amount. |
funnel.upsell.charged | A one-click post-purchase offer was paid with the card saved at checkout. Web only — carries no amount; the money arrives on revenue.*. See upsell events. |
funnel.upsell.failed | A one-click offer's charge was declined, failed authentication or was canceled (for example, a 3D Secure challenge left open past the offer window). Web only. |
funnel.upsell.declined | The visitor said no to a one-click offer. Sent once per session and offer. Web only. |
funnel.retention.offer_accepted | A subscriber took a pause, discount or free-period offer in a manage-subscription funnel, and Stripe applied it. Web only — no amount, no free text. See retention events. |
funnel.retention.cancel_requested | A subscriber cancelled in a manage-subscription funnel (at period end). Carries the reason key when they answered. Web only. |
funnel.retention.reactivated | A subscriber undid a scheduled cancel or a pause in a manage-subscription funnel. Web only. |
You choose which of these keys are delivered to a given endpoint when you configure the connection. Only the Custom Webhook, Slack, and Discord integrations offer the full catalog above, funnel events included — other, more narrowly-scoped providers (Meta CAPI, TikTok Events, analytics/attribution providers) do not. How a funnel session becomes these keys — device events versus web session events, the outbox → Redpanda → ClickHouse pipeline, and the dashboard Sessions tab — lives on Events & Analytics.
funnel.session.lead_captured and funnel.session.checkout_started are also the server sources of a web funnel's lead and checkout_started ad pixel conversions. Those conversions reach Meta, TikTok, Pinterest and Snapchat through the vendor's own connection, under the browser pixel's event id, not through this catalog. The pixel's event id, value and server owner travel on an internal payload key that the curated webhook data never reads, so no webhook receives them and funnel.session.paid still carries no amount (apps/api/src/lib/funnel-event-shape.ts:244-252).
One-time purchase revenue keys
Before 2026-09-04, every one-time (non-subscription) purchase — a consumable
or non-consumable in-app purchase on Apple or Google — was recorded with the
same type as a new subscription, revenue.INITIAL. Stripe funnel purchases
of a one-time package recorded no revenue event at all. Both are fixed: a
one-time purchase is now typed by what it actually is, and it reaches the
Stripe funnel path too.
The type is decided by one rule, in one place
(services/revenue/one-time-type.ts), keyed only on the product's
ProductType:
ProductType | Revenue type |
|---|---|
CONSUMABLE | revenue.CREDIT_PURCHASE |
NON_CONSUMABLE | revenue.NON_RENEWING_PURCHASE |
NON_RENEWING_SUBSCRIPTION | revenue.NON_RENEWING_PURCHASE |
SUBSCRIPTION | unchanged — the caller's own INITIAL / RENEWAL / TRIAL_CONVERSION classification stands |
Producer table — which store, and which code path, writes each of these two keys:
| Revenue key | Apple | Stripe (funnel) | CSV import | |
|---|---|---|---|---|
revenue.CREDIT_PURCHASE | Consumable IAP, receipt verification | Consumable one-time product, receipt verification | One-time purchase of a consumable package | A historical consumable purchase, on import |
revenue.NON_RENEWING_PURCHASE | Non-consumable IAP, receipt verification | Non-consumable one-time product, receipt verification | One-time purchase of a non-consumable package | A historical non-consumable purchase, on import |
All four producers — Apple and Google receipt verification, the Stripe funnel's one-time purchase completion, and the RevenueCat/Adapty CSV importer — call the same rule above, so a purchase is typed identically regardless of which path recorded it.
revenue.CREDIT_PURCHASE means "a consumable IAP was bought," not "a
credit grant was recorded." A CONSUMABLE product configured with no
currency-grant rows behind it grants nothing at all — a project
misconfiguration — and is still filed as a credit purchase. The type is a
property of the product, not of what the purchase happened to grant.
History is not rewritten. A one-time purchase recorded before
2026-09-04 keeps revenue.INITIAL — it is not retyped to
revenue.CREDIT_PURCHASE or revenue.NON_RENEWING_PURCHASE. If you're
reconciling historical numbers against numbers recorded after this date,
older one-time purchases will only ever appear under revenue.INITIAL.
revenue.REACTIVATION fires on all three stores and carries two
different economic meanings under one key: a lapsed subscriber returning
(a win-back offer redemption or a plain resubscribe), and an accounting
reversal — Apple un-does a refund that had already been applied. Only
Apple produces the reversal case; every Google and Stripe
revenue.REACTIVATION is the win-back case. (A billing-issue recovery is
not a reactivation: it is billed as the retry it is — a revenue.RENEWAL
or revenue.TRIAL_CONVERSION — with subscription.recovered beside it.)
Internally, the underlying revenue event is tagged
metadata.reason: "refund_reversed" (the exported
REACTIVATION_REVERSAL_REASON constant in
apps/api/src/services/apple/apple-webhook.ts) for the reversal case only;
an unmarked one is the win-back case. This tag reaches the delivered
Custom Webhook payload as data.reason — a reversal's data carries
"reason": "refund_reversed" in addition to the fixed shape described
above; a win-back's data omits the reason key entirely
(never reason: null), so a Custom Webhook receiver can tell the two
revenue.REACTIVATION cases apart from the delivered payload alone.
Delivery change for existing connections. Connections that already
receive revenue.INITIAL were widened by migration 0123 to also receive
revenue.CREDIT_PURCHASE and revenue.NON_RENEWING_PURCHASE — no action
is needed to keep receiving purchases you were already being told about.
revenue.REACTIVATION is opt-in: it is a genuinely new signal, so it is
not added to any existing connection automatically.
This also changes the vendor event name an existing connection sends for a
one-time purchase, because the vendor mapping is keyed on the revenue type,
not on "a purchase happened." On META_CAPI, a consumable IAP that used
to deliver as Subscribe (via revenue.INITIAL) now delivers as
Purchase (via revenue.CREDIT_PURCHASE); on TIKTOK_EVENTS,
Subscribe becomes CompletePayment. Non-consumable one-time purchases
move the same way, from Subscribe/Subscribe to Purchase/
CompletePayment respectively.
Why: a purchase that never becomes a subscription must not be reported to
an ad platform as a subscription — doing so corrupts the platform's
optimisation, which learns from what it's told converts. The consequence
an advertiser will actually notice: conversion volume on a campaign
optimised for Subscribe events drops on the day this ships, because
one-time purchases that used to count toward it now report as Purchase/
CompletePayment instead.
Per-store coverage
Every lifecycle key below fires on all three stores except the two pause keys,
subscription.offer_redeemed and the two price-increase keys:
| Event | Apple | Stripe | |
|---|---|---|---|
subscription.trial.started | ✅ | ✅ | ✅ |
subscription.cancel_requested | ✅ | ✅ | ✅ |
subscription.expired | ✅ | ✅ | ✅ |
subscription.billing_issue | ✅ | ✅ | ✅ |
subscription.grace_period | ✅ | ✅ | ✅ |
subscription.recovered | ✅ | ✅ | ✅ |
subscription.revoked | ✅ | ✅ | ✅ |
subscription.product_changed | ✅ | ✅ | ✅ |
subscription.uncancelled | ✅ | ✅ | ✅ |
subscription.paused | — | ✅ | ✅ |
subscription.resumed | — | ✅ | ✅ |
subscription.offer_redeemed | ✅ | — | — |
subscription.price_increase_pending | ✅ | ✅ | — |
subscription.price_increase_accepted | ✅ | ✅ | — |
subscription.recovered reaches all three stores, but by two different routes.
Google sends a native SUBSCRIPTION_RECOVERED notification. Apple and Stripe send no
recovery notification at all, so theirs is not read off an event type — it is read off
the purchase's own prior state: the handler captures the status under the same row lock
it writes with, and emits the key only when that prior status was BILLING_ISSUE and
the incoming one grants access. This is not the guess it replaced. An ordinary renewal
of an already-active subscription has no BILLING_ISSUE prior state, so it cannot
produce a false recovery. A dunning flow that ends on subscription.recovered now
works on iOS and web as well as Android.
subscription.grace_period is no longer Google-only. Apple sends
DID_FAIL_TO_RENEW with subtype GRACE_PERIOD when the app has a billing grace
period configured, and that half announces grace_period rather than
billing_issue — because the subscriber still has entitlement, exactly as in the
Google case. Apple deliveries without that subtype, and GRACE_PERIOD_EXPIRED, stay
billing_issue. Stripe announces grace_period while an invoice is past_due
and smart retries are running; once Stripe stops covering it (unpaid,
incomplete), the key is billing_issue.
subscription.paused / subscription.resumed have no Apple row because Apple
has no pause: there is nothing to pause and nothing to resume from. Google
pauses natively; Stripe pauses by subscription status.
subscription.offer_redeemed is the mirror case and Apple-only for the same
reason. Apple has a dedicated OFFER_REDEEMED notification type; Google
delivers an offer redemption as an ordinary purchase/recovery notification with
the offer named inside the purchase resource rather than as its own event type,
and Stripe has no equivalent event at all. If you rely on
subscription.offer_redeemed to stop a win-back campaign, that campaign is
iOS-only today.
The price-increase keys have no Stripe row: a Stripe price change is a plan
change Rovenue reads off the subscription item (subscription.product_changed),
and Stripe asks the customer for no consent.
Plan-change phases
One real plan change can deliver subscription.product_changed twice, and the
phase field inside data is how you tell the two deliveries apart:
- No
phasefield — the announcement. The store says a change is coming. The product may not have moved at all (a price change on the same product is one of these), and for a scheduled downgrade it will not move for weeks. CarriesstoreEventTypeandwebhookEventId. A missingphasemeans "announcement", not "unknown" — the field is never retrofitted onto this producer. phase="effective"— the change has taken effect. Emitted from inside the purchase write itself, only when the product on the purchase actually moved. CarriespreviousProductId,productIdandchangeType. Apple, Google and Stripe all produce it.
Google's deferred-change flow is the case that genuinely produces both: an
announcement at deferral, then an effective delivery at the renewal that applies it.
They are separate events with distinct ids, so webhook-id dedup does not collapse
them. Apple's UPGRADE subtype is the opposite case: Apple has already charged the
subscriber and applied the new tier, so announcing a change as coming would be
false — no announcement is sent for it and you receive only the effective delivery.
When that notification never arrives, the upgrade is still applied once: by the app's
receipt of the new transaction (the effective key is written, but a receipt sends no v1
delivery) or by reconciliation reading Apple's subscription status.
Billing-state consumers should act on phase = "effective"; "your plan changes on
the 14th" notifications want the announcement.
Offer redemptions
subscription.offer_redeemed (Apple OFFER_REDEEMED) carries the offer in data:
{
"storeProductId": "com.example.app.monthly",
"offerType": 4,
"offerKind": "win_back",
"offerIdentifier": "winback_spring",
"subtype": null
}offerTypeis Apple's number: 1 introductory, 2 promotional, 3 offer code, 4 win-back, 5 retention.offerKind(added in v0.13.1) is the store-neutral kind:intro,promotional,offer_code,win_backorretentionhere,nullfor anofferTypeRovenue does not know yet. It is the same vocabulary as a purchase'sofferKind(see which offer produced a purchase), so a consumer need not know Apple's numbering. Treat an unknown value as "some offer".subtypeis Apple's (UPGRADE,DOWNGRADE, ornull).
Zero-value charges
A revenue envelope whose type grants (any of INITIAL, TRIAL_CONVERSION,
REACTIVATION, RENEWAL and the one-time types) but whose amount is 0 — a
trial start, a comp, a $0 lead-in or a $0 renewal — reaches only the
customer's own endpoints and chat channels: Custom Webhook, Slack and
Discord. Ad and attribution providers never see a $0 "Subscribe": they get
the fact through subscription.trial.started (StartTrial) instead. If you
consume webhooks through an analytics CRM (Amplitude, Mixpanel, Braze), the
$0 rows are not delivered there; subscription.* still is.
CSV import is history
Rows imported from a RevenueCat/Adapty CSV export reach analytics
(ClickHouse ingests every revenue message that carries a revenue id) but
never reach integrations and never produce a project-webhook (v1) delivery:
an import backfills the past, it does not announce the present. Imported
rows grant no credits either. A refunded source row still records its charge
plus its REFUND row, so imported gross and net match what the live path
books; subscription charges are labelled by the same cross-store rule —
TRIAL_CONVERSION for the first paid row after a trial row,
REACTIVATION for a paid row whose predecessor lapsed.
When an end is announced
Access and the announcement of an end are separate (since server v0.13.1). When a subscription's
term passes with no renewal on file, Rovenue ends access at once, but sends
subscription.expired and revenue.CANCELLATION only once the store confirms the subscription
ended:
- the store says so — Apple
EXPIRED, GoogleSUBSCRIPTION_EXPIRED, Stripecustomer.subscription.deleted— or Rovenue's reconciliation reads it from the store (within about 15 minutes when the project's App Store Server API key or Play service account is set); - otherwise, 24 hours after the lapse, Rovenue announces it on its own (delivery type
EXPIRATION), so no end is lost for a project the store cannot be asked about.
A renewal that arrives in the meantime (a late DID_RENEW, a renewal Rovenue's reconciliation
finds on Apple's side, a late Play charge) means the subscription never ended: nothing is
announced, and no subscription.expired / revenue.CANCELLATION pair has to be undone. The event
timestamp is always the end of the term, whichever confirmation sent it.
4. Verifying signatures
Every delivery carries both a webhook-* and a Svix-compatible svix-* alias for the same three headers, so you can use whichever your HTTP library or an existing Svix SDK expects:
| Header | Alias | Description |
|---|---|---|
webhook-id | svix-id | The event id — same value as the payload's id field. |
webhook-timestamp | svix-timestamp | Unix seconds (as a string) when the request was signed. |
webhook-signature | svix-signature | One or more space-separated v1,<base64> signatures — see rotation below. |
Signature scheme
toSign = `${webhook-id}.${webhook-timestamp}.${rawRequestBody}`
secret = base64decode(whsecValue without the "whsec_" prefix)
signature = base64( HMAC-SHA256(secret, toSign) )
header = `v1,${signature}`Notes:
rawRequestBodyis the exact bytes received on the wire — parse it for verification only after checking the signature, since re-serializing JSON can change byte-for-byte content.- During a secret rotation,
webhook-signature(andsvix-signature) carry onev1,...candidate per currently active secret, space-separated. Verification passes if any candidate matches — try each one. - Reject requests whose
webhook-timestampis too far from your own clock (5 minutes is a reasonable tolerance) to defend against replay of an intercepted request.
Node.js
const crypto = require("node:crypto");
function verifyRovenueWebhook({ id, timestamp, signatureHeader, rawBody, secrets, toleranceSeconds = 300 }) {
const now = Math.floor(Date.now() / 1000);
if (Math.abs(now - Number(timestamp)) > toleranceSeconds) {
throw new Error("timestamp outside tolerance");
}
const toSign = `${id}.${timestamp}.${rawBody}`;
const candidates = signatureHeader.split(" ");
for (const secret of secrets) {
const encoded = secret.startsWith("whsec_") ? secret.slice("whsec_".length) : secret;
const key = Buffer.from(encoded, "base64");
const expected = crypto.createHmac("sha256", key).update(toSign).digest();
for (const part of candidates) {
const [version, sig] = part.split(",");
if (version !== "v1" || !sig) continue;
const candidate = Buffer.from(sig, "base64");
if (candidate.length === expected.length && crypto.timingSafeEqual(candidate, expected)) {
return true;
}
}
}
throw new Error("no matching signature");
}
module.exports = { verifyRovenueWebhook };Pass every secret you currently have on file for the endpoint (typically one, or two during a rotation window) as the secrets array.
Python
import hashlib
import hmac
import base64
import time
def verify_rovenue_webhook(id_, timestamp, signature_header, raw_body, secrets, tolerance_seconds=300):
now = int(time.time())
if abs(now - int(timestamp)) > tolerance_seconds:
raise ValueError("timestamp outside tolerance")
to_sign = f"{id_}.{timestamp}.{raw_body}".encode()
candidates = signature_header.split(" ")
for secret in secrets:
encoded = secret[len("whsec_"):] if secret.startswith("whsec_") else secret
key = base64.b64decode(encoded)
expected = hmac.new(key, to_sign, hashlib.sha256).digest()
for part in candidates:
version, _, sig = part.partition(",")
if version != "v1" or not sig:
continue
candidate = base64.b64decode(sig)
if hmac.compare_digest(candidate, expected):
return True
raise ValueError("no matching signature")5. Secret rotation
- Rotating an endpoint's secret mints a brand-new
whsec_...value and returns it once, the same as at creation. - The previous secret stays valid for 24 hours after rotation. During that grace window,
webhook-signaturecontains av1,...entry signed with each active secret, so a receiver that hasn't picked up the new value yet can still verify. - After 24 hours the old secret is dropped from the header entirely — update your stored secret before then.
6. Delivery, retries & timeouts
- Delivery is at-least-once — always design your handler to be safe to run more than once for the same event (see idempotency).
- Each attempt has a 15-second wall-clock cap covering connect, headers and the whole response body; anything slower is aborted, treated as a failed attempt and retried per the schedule below. That includes a 2xx whose body is still arriving when the cap hits: the attempt counts as failed and the event is delivered again, which is one more reason handlers must be idempotent.
- 2xx — delivery is marked successful, no retry.
- 3xx — redirects are never followed; treated as a permanent failure (no retry).
- 408, 425, 429 — treated as "try again": retried.
- Other 4xx — treated as a permanent rejection: sent straight to the dead-letter state, no further attempts.
- 5xx (or any other unexpected status) — retried.
Retry schedule
Up to 8 attempts total (the first attempt plus 7 retries), spread over roughly 31 hours:
| Attempt | Wait since previous attempt | Elapsed since first attempt |
|---|---|---|
| 1 | — | 0s |
| 2 | 30s | 30s |
| 3 | 2m | 2m 30s |
| 4 | 10m | 12m 30s |
| 5 | 1h | 1h 12m 30s |
| 6 | 6h | 7h 12m 30s |
| 7 | 12h | 19h 12m 30s |
| 8 | 12h | ≈31h 12m 30s |
If attempt 8 still fails (or a non-retriable status is returned earlier), the delivery moves to a dead-letter state and is shown as failed in the Delivery Log. You can manually redeliver it from there at any time — redelivery is not limited by the retry schedule, only by how long the originating event is retained.
Redelivery window: roughly 3 days from the time of the event. Past that the originating event is pruned and redelivery returns a 410 — the delivery row stays in the log as a record, but there is nothing left to replay. That window is deliberately more than a day longer than the ≈31-hour retry schedule above, so a fully-exhausted dead-letter is always still redeliverable when you find it.
7. Idempotency & at-least-once delivery
Dedupe on the webhook-id header (equivalently, the payload's id field): store it once you've successfully processed a delivery, and skip any delivery whose id you've already seen.
webhook-id is stable for a given underlying event — it does not change across automatic retries, and it also does not change when you manually redeliver that same past event from the Delivery Log, since redelivery replays the original stored event rather than minting a new one. A manual redeliver should therefore be treated by your handler exactly like a very late retry of the same event, not as a new occurrence.
This also holds for a web funnel event: its id is stable across an automatic retry, a manual redeliver, and a replay of the underlying event stream, and it is the same value that identifies the event internally, so it can be used to join a webhook delivery back to other data about the same event.
Manual redeliver of a native (device) funnel event does not currently work. Clicking redeliver on a funnel.session.started / .advanced / .completed / .dismissed delivery that originated from a device returns a 410 ("event expired") even when the event is well within the redelivery window — a known, parked gap in how the Delivery Log looks up the originating event for that one aggregate. Automatic retries of a still-in-flight native delivery are unaffected; only the manual redeliver action on an already-completed or dead-lettered native delivery is broken. Redelivering a web-originated funnel event works as described above.
8. Endpoint requirements
- The URL must use
https://. Plainhttp://is only accepted against a non-production Rovenue deployment (self-hosted local/dev), never in production. - The URL may not embed userinfo (
https://user:pass@host/...). - The target host must resolve to a publicly routable address — loopback, private (RFC 1918), link-local (including the
169.254.169.254cloud metadata address), unique-local, and carrier-grade-NAT ranges are all rejected, both at save time and at delivery time (so a hostname that starts resolving privately after being saved still gets blocked).
Footnotes
-
Defined in the catalog and selectable on a connection, but not yet emitted by the backend — coming with SDK identify instrumentation. ↩
Discord
Post real-time Rovenue revenue, subscription, funnel-session, and credit-ledger events to a Discord channel via an incoming webhook.
Subscriber Identity Attributes
Reserved subscriber attributes for third-party vendor ids (AppsFlyer, Adjust, Firebase, Mixpanel, Amplitude, OneSignal, Braze, Iterable, Airbridge, Singular) used to resolve identity across outbound integrations.