Tutorial: Creating Your First Verification Session
Tutorial: Creating Your First Verification Session
Tutorial: Creating Your First Verification Session
This tutorial walks you through the core Verifa integration — creating a verification session, guiding a user through identity capture, and getting the result back. By the end, you’ll understand the full session lifecycle and have a working end-to-end flow in sandbox.
vk_sandbox_). Find it under
Developers > API > API Keys in the dashboard.
Before we start, here’s the path a session takes:
In live mode, sandbox_pending is replaced by processing (async
verification), but the rest is the same.
Call the API to create a new verification session. The only required field is your API key — everything else is optional.
The response includes the capture_url — the link you’ll send your user to:
The external_ref field is optional but strongly recommended. It’s your
internal user ID — you’ll use it to correlate webhook events and results back
to users in your system.
You can also create sessions directly from the dashboard. Navigate to Verifications in the sidebar and click + New Verification in the top right corner.

The New Verification modal lets you fill in:
Click Create Verification when you’re ready.

After creation, a Verification Created modal appears with the capture URL and a QR code. Click Copy to grab the capture URL, or scan the QR code on a mobile device. You can also click View Session to go to the session detail page, or Create Another to start a new one.

The create session endpoint accepts several optional fields:
For this tutorial, we only need external_ref. You can explore the other
options once you have the basic flow working.
In a real integration, you’d redirect the user to the capture_url or display
it in an iframe/popup via verifa.js. For this
tutorial, just open the capture URL in your browser.
The capture flow walks the user through several steps. Here’s what each one looks like:
The first screen explains what data Verifa will collect and asks for consent. The user checks the consent box and clicks Continue.

The user selects what type of government-issued ID they’ll provide:

Next, the user selects where their ID was issued. For US documents, they also select the issuing state.

The user is prompted to scan the front of their document. Tips are shown for best results: use good lighting, avoid glare, and place the ID on a dark flat surface. Click I’m ready to open the camera.

The camera opens with a document frame. The user can switch between Auto (captures automatically when the document is detected) and Manual mode. There’s also an upload button in the bottom-right corner to upload an existing photo instead.

After capture, the user reviews the photo. They can Submit photo to continue or Retake photo to try again. They can also change the ID type if they picked the wrong one.

In sandbox mode, you can upload any image — Verifa won’t run real OCR. The “Photo quality is low” warning is normal for test images. Just click Submit photo to continue.
For document types that require a back scan (like driver’s licenses), the user is prompted to flip their ID over. The tips remind them to keep the barcode fully visible.

After scanning, the same review screen appears for the back:

If the workflow includes facial recognition (most do), the user takes a live selfie. This is compared against the photo on the ID document to verify the person presenting the ID is the same person pictured on it.
If the workflow’s capture requirements include user information fields (name, email, phone, etc.), the user fills those in before submitting. See the Creating a Workflow tutorial for how to configure which fields are collected.
After completing the capture flow in sandbox mode, the session moves to
sandbox_pending status. The capture UI presents a Choose Verification
Outcome screen with preset options:

Select Approved for this tutorial. The session completes immediately and
Verifa dispatches a session.approved webhook (if you have an endpoint
configured).
After selecting an outcome, you’ll see a confirmation screen:

The user can now close this page. In a real integration, they’d be redirected
to your redirect_url if you set one.
All sandbox presets return mock PII data:
After choosing an outcome, poll the session to confirm it completed:
The status is now completed. Note that the session response itself doesn’t
include the verification results — for that, you need the result endpoint.
Fetch the full result with extracted data, check outcomes, and scores:
In live mode, which PII fields are returned via the API depends on your
organization’s api_pii_fields allowlist. SSN, for example, is only included
if explicitly enabled.
You can also view completed sessions in the dashboard. Navigate to Verifications in the sidebar to see all your sessions with their status, result, risk level, and other details.

Click on a session to open the detail page. Here you can see:

Polling the API works, but webhooks are the recommended way to get notified
when a session completes. If you followed the
Receiving Webhooks tutorial, your
endpoint will receive a session.approved event like this:
See the Handling Webhook Events tutorial for how to build handlers for each event type.
Here’s the complete integration in a single backend endpoint:
Now that you have the flow working, try the other sandbox presets to see how your integration handles rejections and edge cases:
This lets you test all the code paths in your webhook handler before going live.