In Sequence, you can listen to various events to trigger your own workflows. These are called webhooks.Sequence sends webhooks when something changes in your account - customers, invoices, billing schedules, credit notes, quotes. Point a webhook at your endpoint, and Sequence will POST the event data there whenever one of those changes occurs.For the full event catalog, payload envelope, signature format, and delivery behavior, see Webhook events.
The fastest way to start is webhook.site. It gives you a public URL and shows every request that lands. Copy your unique URL.If you want to receive webhooks on your machine, set up a local server and use a tunnel like ngrok to receive webhooks locally.
Create a customer or an invoice in the dashboard. Within a few seconds the request should appear at your endpoint. Confirm the payload’s notificationType matches the event you triggered.
Concatenate the timestamp and the raw request body with a . separator: TIMESTAMP.RAW_BODY. For example: 1779974397972.{"notificationType":"..."}
Compute HMAC-SHA-256 of that string using your webhook’s signing secret
Compare the result with s using a constant-time comparison
Use raw bytes, not re-serialized JSON. The signature is computed over the exact bytes Sequence sent. If you parse the body to a JSON object and re-stringify it before verification, whitespace and key ordering differences will produce a different hash and verification will always fail.
Save the following as verify-webhooks-server.ts. It runs an HTTP server on port 8080 that verifies signatures on requests to POST /webhook.Dependencies: npm install express @types/express tsx
Run with: npx tsx verify-webhooks-server.ts
Return 200 quickly. Acknowledge the request and do any non-trivial work asynchronously (via a queue or background worker). A slow handler blocks the delivery and risks retries
Handle out-of-order events and out-of-date payloads. You can use webhooks as a signal that something has changed, then re-read the resource from the Sequence API to get its current state
Be idempotent. The same event may arrive more than once if a previous delivery failed
Ignore unknown event types and fields. Sequence may add new event types or fields in the future. Accept and ignore types your handler doesn’t recognize rather than throwing
Almost always caused by verifying against re-serialized JSON instead of the raw request body. Confirm your framework gives you the exact bytes Sequence sent.A mismatch in the working example above prints lines like:
Your handler must return a 2xx response. Confirm the endpoint is publicly reachable and isn’t returning an error to Sequence. Any non-2xx response causes Sequence to retry. Failed deliveries are retried for up to 24 hours.