Getting Started
Vouch sends webhook events to the URL you configure in Settings → Webhooks. Each request is a POST with a JSON body and an x-vouch-signature header you should verify before trusting the payload. See the Webhooks section of the API reference for the exact shape of each event’s payload.
Verifying the signature
Vouch signs every webhook request with HMAC-SHA256, keyed by the webhook secret shown when you create the webhook. The signature is sent in the x-vouch-signature header in the form:
Verify it by recomputing the HMAC over {timestamp}.{raw request body} using your webhook secret, and comparing it to v1 with a constant-time comparison. Reject requests where the timestamp is more than 5 minutes old, to guard against replay attacks.
Example (Node.js)
Important: Always use
crypto.timingSafeEqual(or an equivalent constant-time comparison) when verifying signatures, to prevent timing attacks.