Billing integrations

Point your billing provider's webhook at Runearc. Purchases, subscriptions and refunds become events that sequences and goals can use, and each contact's revenue stays up to date.

Connect a provider

In Settings, Integrations, connect a provider, or call POST /v1/integrations/billing. You get a webhook URL of the form /v1/hooks/billing/{provider}/{token}. Paste it into the provider. Every request is checked against the signing secret, which is stored encrypted and never shown again.

runearc integrations connect stripe --secret whsec_...
runearc integrations events bil_...
ProviderSecretVerification
stripePaste the endpoint signing secret (whsec_...)Stripe-Signature, HMAC-SHA256 with a 5 minute tolerance
paddlePaste the notification endpoint secretPaddle-Signature, HMAC-SHA256 with a 5 minute tolerance
lemonsqueezyLeave the secret empty; copy the generated one into Lemon SqueezyX-Signature, HMAC-SHA256 of the body
polarPaste the webhook secretStandard Webhooks, 5 minute tolerance
revenuecatSet the Authorization header value to your secretShared header value
adaptySet the Authorization header value to your secretShared header value
shopifyPaste the app client secretX-Shopify-Hmac-Sha256, base64 HMAC-SHA256 of the body

Events

Each payload becomes one of these events with the properties provider, amount_cents, currency, plan and external_customer_id.

purchaseA one-time payment.
subscription_startedA subscription began and the first invoice was paid.
renewedA later billing cycle was paid.
cancelledRenewal was switched off; access continues until the period ends.
churnedThe subscription ended.
refundedMoney was returned.
trial_startedA free trial began.

Revenue rules

Purchases, started subscriptions and renewals add to the contact's revenue; refunds subtract, never below zero. Amounts are summed in minor units and the currency is not converted. A buyer who is not yet a contact is created with source billing:{provider} and their email status is never changed. A redelivered event is ignored, and an event with no email (and no earlier event that taught the customer id) is logged as unmatched.

A failed signature returns 401 billing_signature_invalid. Check that the secret in Runearc is the provider's current one.

Something unclear or wrong? The API answers every error with a fix, and so should these docs. Back to runearc.com