Webhooks
Webhooks notify your server in real time when events occur in Verifa. Configure a webhook URL in your organization settings to start receiving events.
Event types
For the complete event catalog with payload examples, see the Webhooks Guide and Handling Webhook Events tutorial.
Payload format
Every payload uses the same envelope: event, created_at, and
idempotency_key sit at the top level, and all event-specific fields are
nested under data. Route on event, then read the resource fields from
data (e.g. body.data.session_id).
The data contents vary by event type — see the event reference below and the
Handling webhook events tutorial.
identity.flagged
Fires when an identity is flagged for review. The payload intentionally omits
the reviewer email and free-text reason — fetch them from
GET /identities/{identity_id} if your subscriber has the right scopes.
consortium.match_found
Fires when consortium matching detects a face match for the same individual across two organizations participating in the Verifa Network. Both involved organizations receive the event.
Signature verification
Every webhook request includes an X-Verifa-Signature header in the
Stripe-style format t=<unix_ts>,v1=<hex_hmac>:
t— Unix timestamp the signature was generated atv1— hex HMAC-SHA256 off"{t}.{raw_request_body}", signed with your endpoint’swhsec_*secret
Always verify the signature and reject deliveries with a t= timestamp
more than 5 minutes from your current clock to prevent replay attacks. See
Tutorial: Receiving Webhooks & Validating Signatures
for the full reference recipe with end-to-end code samples.
The legacy bare-hex HMAC over the raw body is still accepted by the
verification helper (src/core/security.py:verify_webhook_signature) for
in-flight deliveries during the deprecation window. New outbound deliveries
always use the timestamped format.
Node.js
Python
Retry behavior
If your endpoint returns a non-2xx status code or does not respond within 30 seconds, Verifa retries the delivery with exponential backoff:
After 5 failed retries, the event is marked as failed. Failed events can be viewed in the dashboard.
Testing webhooks
Use the test endpoint to send a test event to your configured URL:
Best practices
- Respond quickly. Return a
200status code as soon as you receive the event. Process the event asynchronously. - Handle duplicates. In rare cases (network issues, retries), you may
receive the same event more than once. Use the
session_idto deduplicate. - Verify signatures. Always validate the
X-Verifa-Signatureheader to prevent spoofed events.
Related
- Webhooks Guide — Comprehensive setup guide with code examples in 7 languages
- Errors — Error codes returned by webhook API endpoints
- Sessions — Session events and lifecycle