GuidesWebhook Reference

Webhook Reference

RevenueCat Webhooks

URL: https://{slug}.billing.aldero.io/webhooks/revenuecat Auth: Authorization header with tenant-specific secret (configured in dashboard Settings > Billing > Webhooks)

Events Handled

Event TypeResultStatus
INITIAL_PURCHASECreates entitlementactive
NON_RENEWING_PURCHASECreates entitlement (consumable)active
RENEWALCreates/updates entitlementactive
PRODUCT_CHANGECreates entitlement for new productactive
CANCELLATIONUpdates entitlement (stays active until period end)active
UNCANCELLATIONUpdates entitlementactive
EXPIRATIONUpdates entitlementexpired
BILLING_ISSUEUpdates entitlementexpired
SUBSCRIPTION_PAUSEDUpdates entitlementpaused
SUBSCRIPTION_EXTENDEDUpdates entitlementactive
SUBSCRIBER_ALIASSkipped (no subscription data)—
TRANSFERSkipped (handled by RevenueCat SDK login)—

Tenant Resolution

The tenant is resolved from the webhook URL subdomain. Set the webhook URL per tenant in RevenueCat:

  • https://faxdash.billing.aldero.io/webhooks/revenuecat
  • https://myotherapp.billing.aldero.io/webhooks/revenuecat

Environment Detection

RevenueCat sends environment: "PRODUCTION" or "SANDBOX" in the event payload. The billing service tags entitlements accordingly.

Product Resolution

The billing service looks up the product by product_id (or new_product_id for PRODUCT_CHANGE) in the tenant’s product catalog. Products are matched by providerProductId field.

If the product isn’t found, the entitlement is still created with the raw product ID — but without features or grants.

Stripe Webhooks

URL: https://{slug}.billing.aldero.io/webhooks/stripe Auth: Stripe-Signature header verified against tenant-specific webhook secret

Events Handled

Event TypeAction
customer.subscription.createdCreates entitlement
customer.subscription.updatedUpdates entitlement status
customer.subscription.deletedUpdates entitlement to expired
invoice.paidRefreshes subscription entitlement
invoice.payment_failedHandled by subscription.updated

Tenant Resolution

Same as RevenueCat — from the webhook URL subdomain.

User Resolution

Stripe subscriptions must include metadata.userId set at checkout time. Without it, the webhook is skipped.

Environment Detection

Uses subscription.livemode — true for production, false for sandbox.

Webhook Recovery

If webhooks are missed or fail, use the Sync feature:

Dashboard

Go to Billing > Subscribers, find the user, click Sync.

API

curl -X POST https://faxdash.billing.aldero.io/v1/sync/{userId} \
  -H "Authorization: Bearer bil_..."

This fetches the user’s full purchase/subscription history from RevenueCat and reconciles all entitlements.

Webhook Secret Configuration

Per-tenant webhook secrets are managed in the dashboard:

  1. Go to Settings > Billing > Webhooks
  2. Enter the RevenueCat Authorization secret and/or Stripe webhook signing secret
  3. Save

The secrets are stored per-tenant and verified on each incoming webhook.