Skip to main content
Every webhook is signed with your endpoint’s signing secret. Verify the signature on every request, and reject any that fail.

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 the svix package.
The signature covers the exact bytes Amps sent. Verify the raw body, not a parsed and re-serialised copy.
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 use svix, compute the signature yourself:
  1. Build the signed content: {svix-id}.{svix-timestamp}.{raw body}.
  2. Base64-decode the part of your secret after whsec_. That’s the key.
  3. Compute HMAC-SHA256 of the signed content with the key, and base64-encode it.
  4. Compare it, in constant time, with each v1, signature in svix-signature. Accept if any match.
  5. Reject if svix-timestamp is more than 5 minutes from now.

Troubleshooting

Next steps

Webhooks

Endpoint setup, retries, and duplicates.

Events

Every event and its payload.