Webhooks are how Zquence notifies your backend when something changes — KYC submissions, provider verification outcomes, account lifecycle transitions, document reviews, case locks, and tenant updates.

How webhooks work

1

Add a webhook endpoint

Go to Developers → Webhooks in the dashboard and add your backend HTTPS URL.
2

Choose events to subscribe to

Subscribe to exact events like kyc.provider.completed, namespace wildcards like kyc.* or account.*, or * for everything.
3

Zquence sends a signed POST request

Each delivery is an HTTPS POST with a JSON body and signed X-Webhook-* headers for verification.
4

Your backend verifies and responds

Verify the signature, enqueue the work, and return any 2xx status within 10 seconds.

Delivery format

Every delivery is an HTTPS POST with the following headers:

Example delivery

Every event envelope includes environmentId and environmentType so you can distinguish live from sandbox traffic without inspecting the payload.

Handler pattern

Your webhook handler should be intentionally minimal:
  1. Read the raw request body (before any JSON parsing).
  2. Verify X-Webhook-Signature using X-Webhook-Timestamp and your endpoint secret.
  3. Return 200 OK immediately.
  4. Enqueue the event for asynchronous processing.
Never trust a webhook payload before signature verification succeeds. Never do slow work (database writes, API calls) before returning 2xx — you have 10 seconds before Zquence treats the delivery as failed.
Node.js (Express)

Signing secrets

Each endpoint has exactly one signing secret:
  • Provide your own secret when creating the endpoint, or leave it blank and Zquence auto-generates a whsec_... value.
  • The secret is scoped to that endpoint only — different endpoints use different secrets.
  • Rotating the secret takes effect immediately on the next delivery.
Store the secret in your backend secrets manager. Never expose it to a browser or include it in client-side code.

Idempotency and duplicates

Retries and manual replays can produce duplicate deliveries for the same event. Deduplicate on event.id before processing:
Node.js

Retries

If your endpoint returns a non-2xx response or exceeds the 10-second timeout, Zquence marks that attempt as failed and schedules a retry using exponential backoff. Default delivery schedule (3 retries, 4 attempts total):
The number of retries is configurable per environment. The values above reflect the platform default (DEFAULT_WEBHOOK_RETRIES = 3).
After all attempts are exhausted, the delivery is marked failed. You can replay failed deliveries manually from the dashboard or via the API — see Retries.

Manual replay

Zquence stores every delivery and supports on-demand replay. Use this to recover from outages, reprocess missed events, or resync a downstream system. Replay behavior:
  • Scoped to the tenant triggering the replay.
  • Re-delivers the original payload to your configured endpoint — it does not re-emit the event from source.
  • Does not alter historical records inside Zquence.
  • Filterable by environment, endpoint, event type, status, and date range.

Receiver response codes

Even 400 Bad Request and 403 Forbidden are treated as failures and trigger a retry. Your handler should return 200 for events it does not recognise, rather than returning a 4xx.

Local development

Use a tunnel to receive webhooks on your local machine:
Register the generated HTTPS URL in the dashboard, for example:
Set the corresponding ZQUENCE_WEBHOOK_SECRET environment variable locally to the secret shown in the dashboard for that endpoint.

Next steps

Verify signatures

Reference verification handlers for Node.js, Python, and Go.

Event catalog

Every supported event with payload schemas and examples.

Retries

Retry timing, timeouts, and manual replay.

Best practices

Patterns to keep your integration fast and resilient.