Verify signatures
Every request carries three headers, signed as Standard Webhooks specifies:
| Header | Holds |
|---|---|
webhook-id |
The event id. |
webhook-timestamp |
When this attempt was sent, in Unix seconds. |
webhook-signature |
Space-separated v1,<base64> values. |
Use a library
Section titled “Use a library”The Standard Webhooks
libraries
check all three headers in one call; pass them your whsec_… secret and the raw body.
Verify by hand
Section titled “Verify by hand”Each v1, value is the base64 HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{raw body},
keyed with the base64-decoded secret after whsec_. Accept the event when one value
matches in a constant-time comparison and the timestamp is within 300 seconds of now.