Webhooks
The Wall tells your server when money or access changes hands.
Under API in the dashboard, add an endpoint and choose the events. Deliveries are signed, retried for days if your server does not answer, and every attempt is on record with a replay — all of it run by Svix, the service under Clerk's webhooks, embedded in the dashboard.
Events
| Type | When |
|---|---|
purchase.completed | A checkout was paid: a licence was made, or a subscription began. Carries seats when the purchase was a team licence. |
subscription.started | A subscription began. |
subscription.cancelled | A subscription was set to end, or ended. |
payment.refunded | A payment was refunded; the licence is revoked. |
payment.disputed | A buyer disputed a payment with their bank; the licence is suspended while it is open. |
dispute.closed | A dispute closed: won, the licence is active again; lost, it is revoked. |
The same fact reported from two places — Stripe's webhook and an action in the dashboard — is one event id, so your endpoint hears it once.
Verifying a delivery
The endpoint's secret is in the portal. With the svix library (or any Standard Webhooks library):
import { Webhook } from 'svix';
const event = new Webhook(secret).verify(rawBody, headers); // throws when the signature is wrong or oldThe body is { id, type, created, livemode, data }; data is the event's own facts, with a schema and an example in the portal.