Skip to main content
Every webhook is signed. Verify it before you trust it.
1

Use the raw body

Use the body exactly as received, before any JSON parsing.
2

Check the timestamp

Reject timestamps more than 5 minutes old.
3

Compare in constant time

Compute the HMAC and compare it to X-Signature with a constant-time function.
4

Deduplicate

Skip the event if its deliveryId was already processed.

Test vector

Use this to check your implementation:
The signing secret is not your API key. Find it in the dashboard API settings.