Webhook signatures
Verify the Fernway-Signature header with your endpoint secret before trusting any webhook payload.
Applies to
v2
How signing works
Each webhook carries a Fernway-Signature header in the form t=timestamp,v1=signature. The signature is an HMAC-SHA256 of the timestamp, a dot and the raw request body, keyed with your endpoint secret.
Verify every request
Use the raw body exactly as received. Parsing and re-serialising JSON changes the bytes.
Reject timestamps older than five minutes to stop replays.
Compare with a constant-time function such as timingSafeEqual.
Rotating secrets
Roll a secret from the dashboard. For 24 hours both secrets sign each event, so you can deploy the new one without dropping events.