Skip to main content

Hosted flow

The hosted verification flow

Your backend creates a session. Didit shows the screens. You get a webhook.

curl -X POST https://verification.didit.me/v3/session/ \
  -H "x-api-key: $DIDIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workflow_id": "your-workflow-id"}'

Session

Create a session

One call from your server, in cURL or with a server SDK.

curl -X POST https://verification.didit.me/v3/session/ \  -H "x-api-key: $DIDIT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "workflow_id": "'"$DIDIT_WORKFLOW_ID"'",    "vendor_data": "internal-user-id",    "callback": "https://myapp.com/done"  }'

workflow_id is the one required field. The server SDKs read your key from DIDIT_API_KEY. Treat session_token as a secret.

Optional fields

FieldWhat it does
vendor_data
Your own user ID. Didit returns it with every result and links the session to that person, or to that company for KYB.
callback
The page Didit sends the user to after the flow.
callback_method
initiator (the default), completer or both. Use both when a user starts on a computer and finishes on a phone.
metadata
Any JSON you want back. Didit repeats it on webhooks.
language
A two-letter language code for the screens, such as es.
contact_details
The email and phone of the user, and whether Didit emails them.
expected_details
The data you expect. Didit checks it against the document. For KYB it fills in the company name, registry country and registration number.

Show it

Four ways to show the flow

Pick the one that fits your app. Each one takes the URL or the token from the session.

Web SDK

A modal on top of your page, or inline inside it.

DiditSdk.shared
  .startVerification({ url })
Iframe

The flow embedded in your own page.

<iframe src={url}
  allow="camera; ..." />
Redirect

Send the user to the hosted page. Good across devices.

window.location.href = url
Native SDK

Native screens in your mobile app, with NFC.

startVerification(
  token: sessionToken)
A WebView is a fallback only. A WebView is a browser window inside a mobile app. It loses NFC, the tuned camera and the biometric integration. If you must use one, set callback_method to both. WebView guide

Result

Read the decision

The status tells you where a session stands. The decision holds the detail.

The 10 session statuses

Not StartedIn ProgressAwaiting UserIn ReviewApprovedDeclinedResubmittedAbandonedExpiredKyc Expired

Awaiting User applies to company checks, while Didit waits for an owner or an officer to verify.

WebhookDidit sends status.updated to your server. This is the recommended way.
FetchGET /v3/session/{sessionId}/decision/ returns the full decision at any time.
ShapeOne list for each check, such as id_verifications, liveness_checks and face_matches.

The callback URL

https://yourapp.com/verification-complete?verificationSessionId=abc123&status=Approved

After the flow, Didit sends the user to your callback with verificationSessionId and status in the address. Use it to show the right screen. Trust the webhook or the decision endpoint for the result.

Questions

Questions about the hosted flow

What is the hosted verification flow?
It is the set of screens Didit shows your user. Your server creates a session, the user completes the screens on the web or in your app, and your server gets the decision by webhook.
What happens if I create a session twice for the same user?
If an unfinished session exists with the same vendor_data on the same workflow version, Didit returns that session again. The reply is still a 201.
Do I need to show a consent notice?
Yes. Creating a session does not record consent. Before you start the flow, tell the user that Didit powers it, link your privacy notice and collect consent in your own screens.
Where does my API key go?
On your server only. The browser or the app gets the session URL or the session token, never the key.
How do I get the result?
Didit sends a status.updated webhook to your server. You can also call GET /v3/session/{sessionId}/decision/ at any time.
Can I use the hosted flow in a mobile app?
Yes. Pass the session token to the iOS, Android, React Native or Flutter SDK. Prefer a native SDK over a WebView, which loses NFC and the tuned camera.
How long does a verification link stay valid?
By default, the workflow's session expiration setting applies. You can override it for one session with session_expiration_time on create session: a whole number of seconds between 3600 (1 hour) and 2419200 (4 weeks). The response returns expires_at. A session that times out before the user opens it becomes Expired, and you create a new one.
Which languages can the hosted flow show?
The Didit verification screens support 54 languages. Pass an ISO 639-1 code such as es or fr in the language field when you create the session. If you leave it out, the flow detects the browser's language and falls back to English when that language is not supported. The same codes set the language of notification emails through contact_details.email_lang.
Where does the user go when they finish?
To the callback URL you send when you create the session, or the workflow default. Didit appends verificationSessionId and status to it. If your application has allowed domains set, the callback must be on one of them or creation fails with a 400. Treat the redirect as navigation only and read the decision on your server.
Can I check the user's data against what I already know?
Yes. Send expected_details when you create the session, such as first_name, last_name, date_of_birth, nationality and id_country. Didit compares them with what the document shows, and any mismatch appears as a warning in the decision. For a business verification workflow, send company_name, registry_country and registration_number to prefill the registry search.
Can I attach my own data to a session?
Yes. Send a metadata object when you create the session: Didit returns it in API responses and webhooks and never shows it to the user. You can also send up to 10 tags, each up to 50 characters, which show on the session in the console and can be used as filters there.
Which statuses can a session have?
A session starts as Not Started, moves to In Progress, and ends as Approved, Declined or In Review. It can also be Resubmitted when a reviewer asks the user to redo steps, Expired when nobody opened the link in time, Abandoned when the user started but did not finish, or Kyc Expired when an approved document passes its expiry date. Match the strings exactly.
What if I already collected biometric consent?
Send it in biometric_consent when you create the session, with given_at as an ISO 8601 date that is not in the future and an optional text_version. The flow does not ask again, and the decision records the consent as collected by you. You can also send user_state so the flow knows when explicit biometric consent is required.

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.

  • Trusted by EU regulators

    After a year of supervised testing, EU financial regulators confirmed that verifying with Didit is safer than checking an ID in person.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • 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.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • 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.

Start

Create your first session

Create an account, copy the request and run it with your sandbox key.

Free sandbox. Credit applies to work-email sign-ups.