Headers
Each request carries three headers. You need all three to verify.
The signing secret is on the endpoint in Settings → Webhooks in the dashboard. It starts with
whsec_. Sandbox and live endpoints have different secrets.
Verify with the Svix library
Amps signs webhooks with Svix, so you can use thesvix package.
- Express
- Next.js
verify throws if the signature doesn’t match or the timestamp is more than 5 minutes from now. On success it returns the parsed payload.
Verify without the library
If you can’t usesvix, compute the signature yourself:
- Build the signed content:
{svix-id}.{svix-timestamp}.{raw body}. - Base64-decode the part of your secret after
whsec_. That’s the key. - Compute HMAC-SHA256 of the signed content with the key, and base64-encode it.
- Compare it, in constant time, with each
v1,signature insvix-signature. Accept if any match. - Reject if
svix-timestampis more than 5 minutes from now.
Troubleshooting
Next steps
Webhooks
Endpoint setup, retries, and duplicates.
Events
Every event and its payload.