v1 is an HMAC-SHA256 of {t}.{raw_body}, keyed with the endpoint secret (whsec_...). Each attempt is signed again with a new t.
Verify a delivery
1
Read the header
Split
X-Webhook-Signature on the comma and read t and v1.2
Compute the signature
Calculate the HMAC-SHA256 of
t, a period and the raw body, using the endpoint secret as the key.3
Compare the signatures
Compare your result with
v1 in constant time.4
Check the timestamp
Reject the delivery if
t is more than 5 minutes from your clock. This stops a captured request from being replayed.