Web ID Verification Integration With Didit's SDK
Use the Didit JavaScript SDK for web apps, the InContext iframe for a one minute embed, or Redirect for cross-device flows. A full KYC check costs $0.33; the decision arrives in a signed webhook.

Contents
In this guide
Jump to the part you need.
Didit's web integration fits teams that already run a web app and want the verification step inside their own product. The full KYC check costs $0.33: ID document $0.15, passive liveness $0.10, face match $0.05, device and IP analysis $0.03. The caveat that matters: the browser callback is not your record of truth, the signed webhook is.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
The three web methods at a glance
| Method | Setup time | Backend needed | Stays on your domain | Use it when |
|---|---|---|---|---|
| JavaScript SDK | 3 minutes | Optional | Yes | A production web app that needs full control, in React, Vue, Angular, Next.js, Nuxt, Svelte or vanilla JS |
| InContext iframe | Under 1 minute | Optional | Yes | You want an embedded flow today, with UniLink and no backend |
| Redirect | 5 minutes | Yes | No | Maximum browser compatibility, cross-device completion, or when iframe camera access is a problem |
Start free in the sandbox at business.didit.me, no sales call. For developers, connect Didit to an AI assistant via the Didit MCP server. The product this guide covers is User Verification, and every unit price is published on didit.me/pricing.
Read that table as browser experience only. All three methods deliver the final, signed result through webhooks, so the comparison tells you where the flow renders, not how you learn the outcome. Choose the SDK over the iframe when you need modal or inline control with real-time events in your own page; choose the iframe when a single embedded element is enough.
What you are actually building
Three moving parts. A workflow defines which checks run. A session is one person passing through that workflow. A webhook carries the decision to your server. The SDK or the iframe only renders the flow and tells you when the person finished in the browser.
Do not treat that browser event as the verification result. The completion handler fires with a status, but the authoritative decision is the payload signed with your webhook secret, or a fresh call to GET /v3/session/{session_id}/decision/.
Prerequisites
- A Didit organization. Sign up with a work email: the Free plan adds $10.00 of credit each month for the first organization created with an eligible work email for a company domain, which is 30 full KYC checks at $0.33.
- A published workflow, KYC or KYB. The workflow type decides the session kind, there is no separate KYB endpoint.
- An API key with the privileges you use. The decision endpoint needs
read:sessions. - A callback URL on one of your application's allowed domains, if you enforce allowed domains. Otherwise session creation fails with a 400 on
callback. - A webhook destination, and a place to store its
secret_shared_key.
Steps: from workflow to a signed decision
- Create the organization and the workflow. Sign in at business.didit.me, create the organization, open Workflows and click New workflow. Choose Verifying users for a KYC flow, start from a template or empty, then publish. Copy the workflow UUID.
- Or create the workflow from the API. Same object, no console clicks.
Persistcurl -X POST https://verification.didit.me/v3/workflows/ \ -H "x-api-key: $DIDIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workflow_label": "Standard KYC", "workflow_type": "kyc", "features": [ {"feature": "OCR"}, {"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE"}}, {"feature": "FACE_MATCH"}, {"feature": "AML"} ] }'workflow.id. - Create a session. One call, one person. Export both variables first.
export DIDIT_API_KEY="your-sandbox-api-key" export WORKFLOW_ID="your-workflow-uuid" curl -X POST https://verification.didit.me/v3/session/ \ -H "x-api-key: $DIDIT_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"workflow_id\": \"$WORKFLOW_ID\", \"vendor_data\": \"user-42\", \"callback\": \"https://myapp.com/kyc/return\"}" - Read the response. It returns
session_id,urlandsession_token. Send the person tourl, open it in the SDK, or frame it. The session starts as"Not Started"and moves to"In Progress"when the link is opened. - Mount the JavaScript SDK. Install
@didit-protocol/sdk-weband pass theurlyou got back.
React, Vue, Angular, Next.js, Nuxt, Svelte and vanilla examples live in sdk-web-examples, and there is a full Next.js demo at didit-full-demo.import { DiditSdk } from '@didit-protocol/sdk-web'; DiditSdk.shared.onComplete = (result) => { switch (result.type) { case 'completed': console.log('Session ID:', result.session?.sessionId); console.log('Status:', result.session?.status); break; case 'cancelled': console.log('User cancelled verification'); break; case 'failed': console.error('Verification failed:', result.error?.message); break; } }; DiditSdk.shared.startVerification({ url: 'https://verify.didit.me/session/3FaJ9wLqX2Mz' }); - Or embed the iframe in under a minute. A UniLink needs no backend. The
allowattribute is not optional, camera and microphone access is what liveness needs.
With a backend and an API session, swap the UniLink source for the session<iframe src="https://verify.didit.me/u/YOUR_WORKFLOW_ID_BASE64" style="width: 100%; height: 700px; border: none;" allow="camera; microphone; geolocation; clipboard-write; fullscreen; autoplay; encrypted-media; digital-credentials-get" ></iframe>url. Iframe examples are in iframe-example. - Register a webhook destination. This is where the decision lands.
Save the returnedcurl -X POST https://verification.didit.me/v3/webhook/destinations/ \ -H "x-api-key: $DIDIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "label": "Production", "url": "https://myapp.com/api/webhooks/didit", "subscribed_events": ["status.updated", "data.updated"], "webhook_version": "v3" }'secret_shared_keyasDIDIT_WEBHOOK_SECRET. You can read it again withGET /v3/webhook/destinations/{destination_uuid}/. There is no wildcard, so subscribe to every event family you want. - Verify the signature, then act on the status. Read the raw body before parsing JSON, check that
X-Timestampis within 300 seconds of now, recompute the HMAC-SHA256 over the canonical JSON forX-Signature-V2, and compare in constant time against that header and, when present, its-Previouscounterpart. Didit sends the-Previousheaders only for 24 hours after you rotate a destination's signing secret, and accepting a match on either one keeps verification working while you deploy the new secret. Then de-duplicate onevent_id, answer 2xx within 5 seconds, and switch onstatus:"Approved","Declined","In Review","Abandoned","Expired","Resubmitted","Kyc Expired". Status strings are case sensitive and contain spaces. - Keep the decision endpoint as a fallback. If a webhook is missed,
GET /v3/session/{session_id}/decision/returns the same data. Branch onsession_kind,"user"or"business", and read the plural arrays:id_verifications[],liveness_checks[],face_matches[],aml_screenings[]. A feature that did not run is absent or null, never a placeholder.

Expected output
Session creation returns JSON with session_id, url and session_token, plus any metadata and tags you sent. The webhook envelope carries event_id, session_id, status, webhook_type, vendor_data, and a decision object only when the status is Approved, Declined, In Review or Abandoned.
{
"event_id": "uuid",
"session_id": "uuid",
"status": "Approved",
"webhook_type": "status.updated",
"vendor_data": "user-42",
"decision": { }
}

Failure cases and recovery
| Symptom | Cause | Recovery |
|---|---|---|
403 {"detail": "You do not have permission to perform this action."} on verification.didit.me | The key is missing, or lacks the privilege for that endpoint, such as read:sessions on the decision endpoint | Create a key with the scope you need and redeploy |
| 401 | Invalid, revoked or expired API key | Rotate the key, update the environment variable |
| 400 on the create call | Invalid workflow_id | Copy the workflow UUID again from the workflow page and resend the call |
400 on callback | The callback origin is not in the application's allowed domains | Add the origin, or use a custom scheme deep link, which is always accepted |
| 404 on the decision endpoint | The session does not exist | Check that you stored the session_id from the create response |
| Handler slower than 5 seconds, or returning 5xx or 404 | Timed out webhook delivery | Didit retries twice, about 1 and about 4 minutes later, then drops the delivery. Resend from the destination delivery log and reconcile with the decision endpoint |
| Iframe shows no camera | Missing or incomplete allow attribute | Add the full permission list, then retest in the same browser |
Session "Expired" or "Abandoned" | The link was never opened, or the person started and did not finish in the window | Handle it as an unsuccessful session and create a new one with a fresh link. You can also set session_expiration_time between 3600 and 2419200 seconds for one session |
Session sits in "In Review" | Automated checks raised warnings that need a person | A reviewer approves, declines or requests resubmission in the Console |
Inputs and outputs
| Field | Direction | Required | What it does |
|---|---|---|---|
workflow_id | Input | Yes | Workflow UUID. Its type decides whether you get a user or a business session |
vendor_data | Input | Recommended | Your stable identifier for the person, used for duplicate detection |
callback | Input | Optional | Where the hosted flow returns the person, with verificationSessionId and status appended |
language, metadata, tags | Input | Optional | UI language, echoed JSON, and up to 10 tags for filtering in the console |
session_expiration_time | Input | Optional | Overrides the workflow expiry for this session only, 3600 to 2419200 seconds |
session_id | Output | Always | Your key for the decision call and your database record |
url | Output | Always | Hosted flow URL. Goes into the SDK, the iframe, or the redirect |
session_token | Output | Always | Token tied to the session |
status, decision | Output | On webhook | Final status and the full decision object, signed with your destination secret |
Paid steps and review boundaries
Didit runs identity and fraud checks for 4,000+ companies on one public price list. SDKs, the workflow orchestrator, the MCP server and sandbox testing are free. You pay per completed check, from prepaid credit:
- ID document verification $0.15
- Passive liveness $0.10, active liveness $0.15
- Face match 1:1 $0.05, face search 1:N $0.05
- Device and IP analysis $0.03
- Full KYC check bundles ID document verification, passive liveness, face match 1:1 and device and IP analysis at $0.33
- AML screening $0.20, ongoing AML monitoring $0.07 per person a year
- NFC chip reading $0.15 as an add-on, white label flow $0.10, proof of address $0.20
- Phone verification from $0.02 per code plus the carrier price for the country and channel
The review boundary is the "In Review" status. Automated checks reach Approved or Declined on their own. When warnings need a person, the session waits for a reviewer in the Console, and only then does it move to Approved, Declined or Resubmitted. Your integration must not approve access on the browser callback or on "In Progress". Grant access on "Approved" and nothing else.
Worked cost example
A signup flow with 6,000 monthly signups, where 4,500 people complete a full KYC check and 1,200 of those also get an AML screening.
- 4,500 full KYC checks at $0.33 = $1,485.00
- 1,200 AML screenings at $0.20 = $240.00
- Monthly total at list price = $1,485.00 + $240.00 = $1,725.00
On the Scale plan, with 10% off Didit prices: 4,500 x $0.297 = $1,336.50, and 1,200 x $0.18 = $216.00, so $1,552.50 of usage. The Free plan's $10.00 monthly credit covers 30 checks at $0.33. Plan credit resets each month and does not roll over, and top-ups last 12 months.

Sources
- Didit docs: Web identity verification SDKs
- Didit docs: JavaScript SDK
- Didit docs: InContext iframe
- Didit docs: Redirect method
- Didit docs: Quick start
- Didit docs: Create Session API
- Didit docs: Retrieve Session decision
- Didit docs: Webhooks and HMAC signing
- Didit docs: Verification statuses
- Didit docs: Sandbox test data
- Didit User Verification product page
- Didit pricing page and live price feed, read November 26, 2026
- Didit MCP server
- Didit SDK web examples repository
- Didit iframe example repository
Create a free organization at business.didit.me, build a KYC workflow from a template, and run your first session in the sandbox. Sandbox testing is free and unlimited, and you start without a sales call.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
How long does it take to add Didit ID verification to a web app?
The InContext iframe takes under 1 minute because a UniLink needs no backend. The JavaScript SDK takes about 3 minutes for the first working flow, and the Redirect method about 5. Budget real time for the handler on your side: read the raw body, verify the HMAC, then switch on the status string.
Do I need a backend to use the Didit web SDK?
No for the iframe with a UniLink, and no for the JavaScript SDK. A backend is required only if you want to create sessions through the API and receive decisions on your own server. The Redirect method requires a backend for the session call and the callback.
What is the difference between the JavaScript SDK and the InContext iframe?
The SDK gives real-time event callbacks, modal and inline modes, and full programmatic control in React, Vue, Angular, Next.js, Nuxt, Svelte or vanilla JS. The iframe is a single HTML element with postMessage events and limited control. Both keep the person on your domain, and both deliver the final decision through webhooks rather than in the browser.
How do I know a verification actually passed?
Read the webhook signed with your destination secret, or call GET /v3/session/{session_id}/decision/. The status must be the exact string "Approved". A browser completion event is only a signal from a page you do not control.
What does a Didit KYC check cost?
A full KYC check is $0.33, made of ID document verification at $0.15, passive liveness at $0.10, face match at $0.05 and device and IP analysis at $0.03. Adding AML screening at $0.20 brings the compliance bundle to $0.53. You pay per completed check from prepaid credit, and billing runs from monthly plan credit first, then from top-ups.
Can I test the integration without paying or using real documents?
Yes. The sandbox is free on every plan and lets you reproduce outcomes with scenarios and magic values, including a decline on an AML hit, so you can test every branch of your handler. The Free plan also adds $10.00 of credit each month for the first organization created with an eligible work email for a company domain.
What happens if the person closes the flow or the session expires?
A session that is opened and not finished moves to "Abandoned". A session that is never opened moves to "Expired". Neither status is approved, so handle it as an unsuccessful session and create a new session when appropriate. You can set session_expiration_time per session from 3600 to 2419200 seconds.
How do I handle a verification that finishes on a different device?
Use the Redirect method, or use the SDK and let the person open the link elsewhere. Sessions are cross-device by design, and callback_method can be set to "both" so the return works from either the initiating or the completing device. The webhook fires regardless of which device the person used.
Can I keep users on my own domain with my own branding?
Yes for the JavaScript SDK and the InContext iframe, which both render inside your page and are marked white-label in the comparison table. Full white-label of the hosted flow is a separate module at $0.10 per check. The Redirect method sends the person to a Didit-hosted page.
Why does session creation fail with a 400 on callback?
Because your application enforces allowed domains and the callback origin is not on that list. The check compares scheme, host and port. Add the origin, or use a custom URL scheme for an app deep link, which is always accepted.
Does a rotated webhook secret break signature verification?
Not if your handler accepts both headers. For 24 hours after you rotate a destination's signing secret, Didit sends X-Signature-V2-Previous alongside X-Signature-V2, made with the replaced secret. Compare in constant time and accept a match on either one, then remove the old secret from your configuration once the window closes.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


