Webhooks Guide
Webhooks deliver real-time event notifications to your server when things happen in Verifa — sessions complete, screening finds matches, identities update, and more. This guide covers setup, security, event filtering, and best practices.
Quick setup
1. Create a webhook endpoint
Store the secret securely — you need it to verify webhook signatures. The
secret is only returned on creation and rotation.
2. Handle events
JavaScript
Python
Go
Ruby
PHP
Java
C#
3. Test it
Send a test event to verify your endpoint is working:
Event catalog
Session events
Screening events
Identity events
Case events
Document events
Quality assurance events
Event filtering
Subscribe to specific events or use "*" to receive all events:
Payload format
All webhook payloads follow this structure:
The data object contents vary by event type. Session events include
session_id, external_ref, and status. Identity events include
identity_id and the changed fields.
Signature verification
Every webhook includes an X-Verifa-Signature header — an HMAC-SHA256 hash of
the raw request body signed with your endpoint’s secret.
Always verify signatures to prevent spoofed events. Use the raw request body (not parsed JSON) for verification, and use a constant-time comparison function.
Retry behavior
If your endpoint returns a non-2xx status or doesn’t respond within 30 seconds, Verifa retries with exponential backoff:
After 5 failed retries, the delivery is marked as failed.
Circuit breaker
If an endpoint accumulates 10 consecutive failed deliveries (all retries exhausted), Verifa automatically disables the endpoint and sends an email notification to your organization’s admins. Re-enable it in the dashboard or via API after fixing the issue.
Managing endpoints
Rotate the signing secret
Returns the new secret. Update your verification code before the old secret stops working.
Clone an endpoint
Duplicate an endpoint with a new secret (useful for migration):
View delivery history
Retry a failed delivery
Key inflection
Control the casing of payload keys per endpoint:
Options: snake (default), camel, kebab.
Best practices
-
Respond quickly. Return
200immediately and process the event asynchronously. If your handler takes too long, the delivery may time out and trigger unnecessary retries. -
Handle duplicates. Use the
session_idor event data to deduplicate. In rare cases (network issues, retries), you may receive the same event more than once. -
Verify signatures. Always validate the
X-Verifa-Signatureheader using the raw body and a constant-time comparison. Never process unverified events. -
Exempt from CSRF. If your framework has CSRF protection, exempt your webhook endpoint path.
-
Use specific events. Subscribe only to the events you need rather than
"*". This reduces noise and makes your handler simpler. -
Monitor delivery health. Check the delivery history in the dashboard regularly. If you see frequent failures, investigate timeouts or errors on your endpoint.
Related
- Webhooks — Quick reference for event types and payload format
- Sessions — Session events and lifecycle
- Screening & Reports — Screening event details
- Errors — Error codes returned by webhook API endpoints