Signature headers
Each delivery includes three headers that you use together to verify the signature:Verify with the Svix library
Off the Hook implements the Standard Webhooks specification, so the Svix verification library works without modification. Your signing secret starts withwhsec_ — pass it as-is; the library handles base64 decoding internally.
Secret rotation and multiple signatures
During a secret rotation grace period, thewebhook-signature header contains multiple space-separated v1, values — one computed with the new secret and one with the old. The Svix library accepts any valid signature in the header automatically, so no code changes are required during a rotation.
Manual verification
If no Svix library is available for your language, you can implement verification directly:1
Construct the signed content
Concatenate the three values with
. as the separator:2
Decode the secret
Your secret starts with
whsec_. Base64-decode the part after whsec_ to get the raw key bytes.3
Compute the HMAC
Compute HMAC-SHA256 over the signed content string using the raw key bytes.
4
Encode and compare
Base64-encode the resulting bytes. Compare the result against each
v1,<value> entry in the webhook-signature header using a constant-time comparison to prevent timing attacks. The delivery is valid if any entry matches.