Tutorial: Handling Webhook Events
This tutorial covers the webhook events you’ll use in a real integration, what each payload looks like, and how to handle them. By the end, you’ll have a clear map of which events to subscribe to and how to react to each one.
This tutorial assumes you already have a working webhook endpoint that verifies signatures. If not, start with the Receiving Webhooks & Validating Signatures tutorial first.
The most important events
Most integrations need just three to five events. Here’s what to subscribe to based on your use case:
Event payload structure
Every webhook payload follows the same top-level structure:
event— the event type stringidempotency_key— unique delivery ID for deduplication (same key on retries)- Remaining fields vary by event type (documented below)
Session events
Session events track the verification lifecycle from creation to final decision. These are the events most integrations are built around.
session.approved
Fired when a verification session passes — either automatically by the workflow engine or manually by a reviewer.
Always present:
Included on most paths (treat as optional):
The result object, when present, includes:
face_match_passed— whether the selfie matched the document photoage_check_passed— whether the age verification passedextracted_data— PII extracted from the document (present on sandbox and manual review paths; may be absent on the live engine path)
Not all approval paths include identity_id or result. Auto-retry
completions and case API approvals send a minimal payload with only the
guaranteed fields. Always use defensive access (e.g., .get() in Python,
optional chaining in JavaScript) for these fields. If you always need extracted
data, fall back to the
Get Session API.
Typical handler:
Node.js
Python
Go
session.declined
Fired when a verification session is rejected — either automatically or by a reviewer.
Always present:
Included on some paths (treat as optional):
Typical handler:
Node.js
Python
Go
session.requires-review
Fired when the workflow engine flags a session for manual review instead of making an automatic decision.
Typical handler:
Node.js
Python
Go
session.created
Fired when a new verification session is created via the API.
Useful for tracking session creation rates and linking sessions to users in your system before verification completes.
session.started
Fired when the applicant opens the capture URL and begins the verification flow.
Useful for measuring conversion from session creation to capture start.
session.expired
Fired when a session’s capture token expires before the applicant completes the flow.
Typical handler:
Node.js
Python
Go
session.resubmission-required
Fired when a session is auto-rejected because the captured images were too low quality to process.
session.redacted
Fired when session PII and documents are permanently deleted (GDPR erasure or manual redaction).
session.retention-expired
Fired when session data is automatically purged by your organization’s retention policy.
Check events
Check events are fired by standalone screening checks (AML, PEP, sanctions, email risk, phone risk). These are separate from session-based verification.
check.completed
Fired when a screening check finishes processing, regardless of whether it found matches.
Always present:
Included on most paths (treat as optional):
For PEP checks with hits, additional fields are included:
check.matched
Fired alongside check.completed when a check finds one or more matches.
Subscribe to this event if you only care about hits and want to skip clears.
Typical handler:
Node.js
Python
Go
check.monitoring.new_hits
Fired when continuous monitoring discovers new matches on a previously screened individual. This is critical for ongoing AML compliance.
Typical handler:
Node.js
Python
Go
check.monitoring.clear
Fired when a monitoring rescreen completes with no new matches.
Usually no action needed, but useful for audit logs and compliance reporting.
Identity events
Identity events fire when verified identity records are created or updated.
identity.created
Fired when a new identity record is created for the first time (typically after a session is approved).
identity.updated
Fired when an existing identity record is updated with data from a subsequent verification session.
The first session for an individual fires identity.created. Any subsequent
sessions that match the same individual fire identity.updated.
Case events
Case events track the manual review lifecycle.
case.created / case.claimed / case.approved / case.rejected / case.escalated
All case events share the same payload structure:
When a case is approved or rejected, Verifa also fires the corresponding
session.approved or session.declined event. You don’t need to subscribe to
both unless you want case-specific metadata like case_id.
Document events
Document events track standalone document processing (outside of session-based verification).
document.uploaded
document.classified
document.extracted
document.verified
document.compared
Fired when a document is compared against another document or an identity record.
document.redacted
Building a complete handler
Here’s a full example that handles the most common events for a KYC onboarding integration:
Node.js
Python
Go
Tips for production
-
Use
external_refas your primary join key. It’s the reference ID you pass at session creation, so you can map events back to users in your system without storing Verifa session IDs. -
Treat
resultas optional. Not all approval paths include theresultobject. If you need extracted data, fall back to the Get Session API whenresultis absent. -
Subscribe to
check.monitoring.new_hitsif you do AML. This is the only way to get real-time alerts when ongoing monitoring finds new sanctions or PEP matches after the initial screening. -
Don’t subscribe to everything. Use
"*"only during development. In production, subscribe to the specific events you handle. This reduces noise and makes your handler simpler. -
Log every event. Even if you don’t act on an event, log it for debugging and audit trails.
Next steps
- Receiving Webhooks & Validating Signatures — Set up your endpoint and verify signatures
- Webhooks Guide — Event filtering, attribute blocklists, and key inflection
- Webhooks API Reference — Full event type list and retry behavior
- Sessions — Session lifecycle and status reference
- Screening & Reports — AML screening details