Skip to main content
Webhooks let you register an HTTPS endpoint that Vouchmark associates with one of your apps (KYB widgets). A webhook is keyed by the combination of app, environment, and service type. Each registration points at a single endpoint URL, and only receives events for its subscribed serviceType running in its environment. When a matching event occurs, Vouchmark POSTs a signed JSON payload to your endpoint. Verify every delivery with the webhook’s signing secret before trusting it.

The registration model

A webhook registration has these fields:

The signing secret

Each webhook has its own signing secret in the form whsec_....
  • The full secret is returned only once, in the response to create and rotate. Store it securely the moment you receive it.
  • In the list response and the dashboard, the secret is masked (for example whsec_…ab12, last 4 characters visible) so you can identify it without exposing it.
  • If a secret leaks, rotate it. The old secret stops verifying deliveries immediately, so update your integration in lockstep.

The event envelope

Every delivery is a JSON body with this shape:

Headers

Each delivery carries these headers:

Verifying the signature

The X-Vouchmark-Signature header has the form t=<unixSeconds>,v1=<hmacHex>, where t matches X-Vouchmark-Timestamp. To verify a delivery:
  1. Read t and v1 from the X-Vouchmark-Signature header.
  2. Build the signed payload by concatenating the timestamp, a ., and the exact raw request body (the bytes you received, before any JSON re-serialization):
  3. Compute HMAC-SHA256(signedPayload, signingSecret) and encode it as lowercase hex.
  4. Compare your computed value against v1 in constant time.
  5. Reject deliveries whose t is too far in the past to protect against replay attacks.
Verify against the raw request body. If your framework parses and re-serializes JSON before you read it, the bytes change and the signature will not match. Capture the raw body string first.

Node.js example

In Express, capture the raw body with express.raw({ type: "application/json" }) (or express.json({ verify })) so rawBody is the unparsed string.

Event types

A webhook only receives events for its subscribed serviceType and environment. The event types currently emitted are:

Service types

Sandbox vs live

sandbox and live are fully separate. Register a webhook per environment, and remember that each environment has its own signing secret. Test against sandbox before pointing live traffic at your production endpoint.

Reliability and retries

  • Deliveries are at-least-once. The same event may arrive more than once, so dedupe on the delivery id (the whd_... value, also in X-Vouchmark-Delivery).
  • Vouchmark attempts each delivery up to 5 times with exponential backoff (base 5 seconds).
  • Each attempt has a 10 second request timeout.
  • Respond with a 2xx status quickly and process the event asynchronously. Any non-2xx response or a timeout triggers a retry.

Register an endpoint

Response
The signingSecret is returned in full here only — store it now.

List your endpoints

List responses return the secret masked as signingSecretMasked, never in full.

Rotate a signing secret

Returns a new full signingSecret. The previous secret stops verifying deliveries immediately. See Rotate webhook secret.

Delete an endpoint

Registrations are soft-deleted, so a deleted endpoint stops being listed immediately.

Rate limits

Webhook create/delete is limited to 100 changes per hour per IP. See Rate limits.