Webhooks Reference
See it in the demo — Tell your backend the moment something changes (~2min)BillDog receives store notifications through incoming webhooks, and dispatches its own events to your server through outgoing webhooks. Store notifications are one source of those outgoing events, not the definition of them — BillDog Auth emits user, session and organization events that come from no store at all.
How It Works
Each app store sends real-time notifications when a subscription renews, is cancelled, enters a billing retry period, or changes in any other way. BillDog exposes a dedicated endpoint per store. You register that URL in the store's developer console and BillDog handles signature verification, event parsing, and customer record updates automatically.
If you also need your own backend to react (provisioning access, sending emails, syncing to a CRM), enable outgoing webhooks in Integration & Data → Webhooks. BillDog POSTs to your URL after processing a store notification — and also when something happens that no store knows about: a user signs up, a session is revoked, someone joins an organization. Those thirteen authentication and organization events are documented in full under Auth webhooks.
Incoming Webhooks
Each project has its own endpoint URL per store: the path shown below plus ?r= and the project's route key. Copy it from Project Settings → Settings → Store Setup once your store credentials are verified, and paste it into the store's developer console. The bare path without a route key refuses every notification (HTTP 410). BillDog verifies every request cryptographically before acting on it.
Apple/webhooks-apple
Receives App Store Server Notifications v2. BillDog validates the JWS (JSON Web Signature) envelope, decodes the signed transaction and renewal info, then updates the customer's subscription state.
SUBSCRIBED — initial purchase or resubscribe
DID_RENEW — automatic renewal succeeded
DID_CHANGE_RENEWAL_STATUS — auto-renew toggled
DID_CHANGE_RENEWAL_PREF — plan change scheduled
DID_FAIL_TO_RENEW — billing issue entered grace period
EXPIRED — subscription lapsed
GRACE_PERIOD_EXPIRED — access revoked after retry failure
OFFER_REDEEMED — promotional or offer code applied
REFUND — Apple issued a refund
REVOKE — Family Sharing revocation
Google/webhooks-google
Receives Google Play Real-time Developer Notifications via Cloud Pub/Sub push. BillDog decodes the base64 notification, determines the notification type, then queries the Google Play Developer API for the full subscription or one-time purchase details.
SUBSCRIPTION_RECOVERED — billing retry succeeded
SUBSCRIPTION_RENEWED — auto-renewal processed
SUBSCRIPTION_CANCELED — user cancelled
SUBSCRIPTION_PURCHASED — new subscription
SUBSCRIPTION_ON_HOLD — payment issue, hold period started
SUBSCRIPTION_IN_GRACE_PERIOD — grace period active
SUBSCRIPTION_RESTARTED — resubscribed after expiry
SUBSCRIPTION_PRICE_CHANGE_CONFIRMED — user accepted new price
SUBSCRIPTION_DEFERRED — renewal deferred
SUBSCRIPTION_PAUSED — user-initiated pause
SUBSCRIPTION_EXPIRED — subscription ended
ONE_TIME_PRODUCT_PURCHASED — consumable or non-consumable bought
Stripe/webhook-stripe
Handles Stripe webhook events for web checkout sessions and subscription lifecycle. BillDog verifies the stripe-signature header using your webhook signing secret.
checkout.session.completed — checkout finished — fulfils a paid or free checkout; a delayed payment waits
checkout.session.async_payment_succeeded — a delayed payment (SEPA, ACH, Boleto, OXXO) settled — fulfils the checkout
checkout.session.async_payment_failed — a delayed payment failed — the checkout fails, nothing stays granted
checkout.session.expired — checkout abandoned
customer.subscription.created — new subscription
customer.subscription.updated — plan change, renewal state, cancellation scheduled
customer.subscription.deleted — subscription ended — access revoked
customer.subscription.trial_will_end — trial ends in ~3 days
invoice.paid — renewal paid (and a retried first payment collected)
invoice.payment_failed — renewal declined — grace period starts
invoice.payment_action_required — customer must confirm the payment (3D Secure)
payment_intent.succeeded — one-time payment succeeded (acknowledged; fulfilment runs on the checkout events)
payment_intent.payment_failed — one-time payment failed
charge.failed — charge declined
charge.refunded — refund — access revoked, revenue reversed
charge.dispute.created — dispute opened — access suspended
charge.dispute.closed — dispute won (access restored) or lost
Amazon/webhooks-amazon
Coming soon. Amazon Appstore purchases are not supported yet: this endpoint answers 501 STORE_NOT_SUPPORTED to every request and stores nothing, so do not point Amazon's Real-Time Notifications at it. There are no Amazon credentials to configure.
Roku/webhooks-roku
Coming soon. Roku Pay purchases are not supported yet: this endpoint currently answers 501 STORE_NOT_SUPPORTED to every request, so a Roku notification does not create a subscription or entitlement. The events below are the ones it is planned to handle.
Sale — new purchase
Renewal — subscription renewed
Cancellation — user or system cancelled
Credit — refund issued
Outgoing Webhooks
BillDog forwards its own events to your server: some raised after an incoming store notification, others raised by things that never touch a store, such as a sign-in or a change of organization membership. All of them go through the internal dispatch-webhook function.
Configuration
In the dashboard, go to Integration & Data → Webhooks and add your server URL. BillDog generates the signing secret for you — you do not supply one, and it is not optional: every delivery is signed, and a delivery whose secret cannot be read is marked failed rather than sent unsigned. The HMAC-SHA256 signature arrives in the X-BillDog-Signature header.
The secret is shown exactly once, when the endpoint is created. It is encrypted at rest and there is no read path afterwards. Copy it then — a lost secret is regenerated, never recovered. Regenerating keeps the old secret valid for 24 hours so you can switch without dropping deliveries — see below.
Custom headers. An endpoint can also carry headers of your own, sent with every delivery to it — an Authorization token your server expects, a routing key. Add them when you create the endpoint, or later with the key button on its row. They are stored encrypted and only their names are shown afterwards. BillDog’s own headers (the signature, timestamp, event id and content type) cannot be replaced, and at most 10 are allowed.
Events BillDog sends:
Subscription Lifecycle
subscription.startedsubscription.renewedsubscription.canceledsubscription.expiredsubscription.pausedsubscription.resumedsubscription.uncanceledsubscription.billing_issuesubscription.updatedsubscription.price_changedsubscription.product_changedsubscription.transferredTrial Events
trial.startedPurchase & Payment
purchase.refundedpurchase.completedpurchase.refund_reversedpurchase.transferredAuthentication
user.createduser.updateduser.deleteduser.banneduser.unbannedsession.createdsession.revokedOrganizations
organization.createdorganization.updatedorganization.deletedorganization.membership.createdorganization.membership.updatedorganization.membership.deletedPaywalls
paywall.webhookJourneys
journey.webhookAuthentication and Organizations are the thirteen events BillDog Auth emits. They are raised by authentication and membership activity rather than by a store notification, so they fire whether or not the project sells anything. Auth webhooks covers what each one carries, and what its payload deliberately leaves out.
The dashboard’s event picker also offers these names, which BillDog does not send: a subscription to one never fires. currency.balance_low, currency.consumed, currency.expired, currency.granted, currency.transferred, customer.created, customer.deleted, customer.updated, entitlement.granted, entitlement.revoked, entitlement.temporary, invoice.failed, invoice.issued, invoice.paid, purchase.made, refund.reversed, subscription.extended, trial.converted, trial.expired.
Paywall Webhook Buttons
A paywall button’s Webhook action sends to one of these endpoints: you choose it in the action, and the endpoint holds the URL, the signing secret and any custom headers, so none of them is stored in the paywall. Each tap is delivered like any other event — signed, logged and retried — with the event type paywall.webhook, whatever the endpoint subscribes to.
- Environments. The action names a production endpoint, and optionally a sandbox one for taps from your app’s sandbox key. Without a sandbox endpoint, a sandbox tap sends nothing; a production endpoint never receives sandbox taps.
- Paused endpoints receive nothing until they are active again.
- The tap does not wait for your server: the first attempt goes out at once and failures are retried in the background (see Retry Behaviour).
- Signed-out visitors can tap too (rate-limited per network address); their requests say
is_anonymous: trueand name an anonymous customer id.
{
"event": "paywall.webhook",
"paywall_id": "…",
"component_id": "subscribe-button",
"project_id": "…",
"customer_id": "…",
"is_anonymous": false,
"is_sandbox": false,
"timestamp": "2026-10-08T12:00:00.000Z",
"data": { "plan": "pro" }
}data is the JSON you add in the action, with {{customer_id}}, {{paywall_id}}, {{component_id}}, {{project_id}} and {{timestamp}} filled in by BillDog’s server.
Journey Webhook Steps
A journey’s Webhook step also sends to one of these endpoints, chosen in the step. It is delivered like a paywall tap — signed with the endpoint’s secret, logged and retried — with the event type journey.webhook, whatever the endpoint subscribes to. Sandbox customers go to the step’s sandbox endpoint, or nowhere if it has none. A run sends one delivery per step.
{
"event": "journey.webhook",
"project_id": "…",
"customer_id": "…",
"journey_id": "…",
"step_id": "…",
"is_sandbox": false,
"timestamp": "2026-11-24T12:00:00.000Z",
"data": { "plan": "pro" }
}data is the JSON you add in the step, with {{customer_id}}, {{journey_id}} and {{step_id}} filled in.
Payload and Headers
The POST body is the event’s own payload, serialised as-is. There is no single wrapper shared by every event type: a store-derived purchase event and a user.created event describe different things and carry different top-level fields. Do not write a receiver that assumes one shape for all of them.
What is identical on every delivery is the header set:
X-BillDog-Signature: <HMAC-SHA256, hex>
X-BillDog-Timestamp: <unix seconds>
X-BillDog-Event: subscription.started
X-BillDog-Event-ID: <stable id, reused across retries>
X-BillDog-Request-ID: <dispatch request id>
webhook-signature: v1,<hex> [v1,<hex>] (both secrets, during a rotation)Rotating the secret without dropping deliveries
For 24 hours after you regenerate a secret, every delivery is signed with both the new and the old secret. X-BillDog-Signature carries only the new one, so a server still holding the old secret must verify webhook-signature instead: it lists every valid signature, space-separated, as v1,<hex> v1,<hex>. Each is the same hex HMAC-SHA256 of {timestamp}.{body} — accept the delivery if any one matches.
The header borrows the Standard Webhooks shape, not its algorithm (which signs the message id and uses base64), so do not point a Standard Webhooks library at it — it will reject every delivery.
The signature is computed over the timestamp header, a full stop, and then the raw request body — not the body alone — so a captured delivery cannot be replayed indefinitely. Deduplicate on X-BillDog-Event-ID, which does not change between retries of the same event.
A store-derived event is a flat object keyed by the records it touched. This is what an App Store purchase that opens a subscription sends (subscription.started):
{
"event_id": "...",
"event_type": "subscription.started",
"store_purchase_id": "...",
"state_version": 1,
"transaction_id": "...",
"store_transaction_id": "2000000812345678",
"transaction_type": "initial_purchase",
"is_trial": false,
"is_resubscribe": false,
"customer_id": "...",
"app_user_id": "user_123",
"platform": "ios",
"store": "app_store",
"product_kind": "auto_renewable",
"store_product_id": "com.acme.pro.monthly",
"product_id": "pro_monthly",
"revenue_usd": 9.99,
"gross_revenue_usd": 9.99,
"price_local": 9.99,
"currency": "USD",
"country": "US",
"quantity": 1,
"purchased_at": "2026-07-15T08:30:00Z",
"timestamp": "2026-07-15T08:30:00Z",
"is_sandbox": false
}platform is ios or android, product_id is your BillDog product identifier and store_product_id the store’s SKU. Events for a payment (subscription.started, subscription.renewed, trial.started, purchase.completed) carry the transaction, as above. Events for a change of state (subscription.canceled, uncanceled, billing_issue, expired, updated and the rest) carry the subscription instead: state (the store’s state, such as active or in_grace), will_auto_renew, expires_at and, after a refund, revocation_reason. Events of one purchase are ordered by state_version.
A purchase on Apple’s monthly plan with a 12-month commitment adds billing_plan, commitment_expires_at, commitment_will_renew, commitment_period_number, commitment_total_periods and commitment_payments_remaining to every event. 12-Month Commitment Plans
An authentication or organization event is shaped differently — keyed by type, occurred_at, user_id and a nested data object. Auth webhooks
Retry Behaviour
BillDog expects a 2xx or 3xx status within 10 seconds. Delivery is retried in two stages, up to 8 attempts over about 2.5 hours:
- Three immediate attempts, in the dispatch itself, with a short exponential back-off (about 2s then 4s).
- Five asynchronous retries at 5, 10, 20, 40 and 80 minutes, run by a scheduled worker.
A 4xx is permanent and is never retried. Your endpoint said the request was wrong, and repeating it will not change that — the delivery is marked failed immediately, at the first attempt. Only 5xx responses, timeouts and network errors are treated as transient. An endpoint that returns 400 while you deploy loses those events outright.
After 10 consecutive failures the endpoint is disabled automatically and must be re-enabled in the dashboard. The project owner is emailed when it happens, but alert on your own 5xx rate too — it tells you before the tenth failure.
A 4xx at the first attempt, and the delivery that disables an endpoint, are marked failed in the endpoint’s delivery log. Deliveries whose retries run out, or that get a 4xx during a retry, go to the dead-letter log. Re-enabling an endpoint resends nothing. To resend, use Replay on a failed delivery in Integration & Data → Webhooks, or Replay All DLQ for the dead-letter log.
Was this page helpful?
Or rate this page: