Sending and APIs
Webhook signature (HMAC)
Also called: HMAC signature, signed webhook
A webhook signature is an HMAC of the request body computed with a secret only you and the provider know. Checking it proves the request came from the provider and wasn't altered.
Compute HMAC-SHA256 over the exact raw body bytes (plus a timestamp, if the scheme includes one) with your endpoint secret and compare it to the header with a constant-time comparison. Parsing and re-serialising the JSON first changes the bytes and the check fails.
Reject old timestamps to stop replays. During a secret rotation, accept either secret until the old one expires.
In Envello
The Envello-Signature header is t=<unix seconds>,v1=<hex HMAC-SHA256 of "t.body">. During a rotation it carries one v1 per active secret.