Skip to content

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.

The Standard Webhooks libraries check all three headers in one call; pass them your whsec_… secret and the raw body.

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.