Verifying webhook signatures
Prove that a delivery came from EVVA, was not changed, and is not a replay — before you act on it.
EVVA signs every delivery per Standard Webhooks. Verify each one on the raw request body, exactly as received — parsing and re-serialising the JSON changes the bytes and breaks the signature.
The headers
The signed content is <webhook-id>.<webhook-timestamp>.<raw body>. The key is the base64-decoded part of your
secret after the whsec_ prefix.
Verify with an SDK
Every official SDK verifies the signature, checks the timestamp window, checks that webhook-id equals the body’s
eventId, deduplicates on it and tells you which status to answer: 204 handled or duplicate, 401 bad signature or
timestamp, 400 bad payload, 500 your handler failed (EVVA retries a 500).
Use a durable, shared deduplication store. An in-memory store forgets after a restart, so a retry that arrives after a deploy would be handled twice.
Verify by hand
Read the raw body and the three headers
Header names are case-insensitive. A missing or empty header is a refusal.
Check the timestamp
webhook-timestamp must be plain decimal seconds within 300 seconds of your clock, in either direction.
Compute the expected signature
base64(HMAC-SHA256(key, "<webhook-id>.<webhook-timestamp>.<raw body>")), where key is the base64 decoding
of your secret without its whsec_ prefix.
Rotating the signing secret
The agency rotates a secret in the Partner Hub (Rotate on the endpoint). The new secret is shown once, and for an overlap period — 24 hours by default, at most 7 days — EVVA signs every delivery with both secrets. Configure the new secret next to the old one, deploy, and remove the old one when the overlap ends: no delivery fails during the switch.
A signature proves the delivery is EVVA’s; it does not make the event fresh or unique. Always check the timestamp
window and deduplicate on webhook-id — together they stop a captured request from being replayed.
The four SDKs are tested against the public Standard Webhooks reference vector and a shared set of EVVA vectors (rotation, tolerance edges, tampered headers, Unicode bodies), so they agree on every verdict.
