Skip to main content

Redirect

Redirect to the hosted page

Send your user to the page Didit hosts. Didit sends them back to your callback when they finish.

window.location.href = session.url;

Send

Send the user

Create a session on your server, then set the browser location to its URL.

Setup time5 minutes
BackendRequired, to create the session
Where it runsverify.didit.me, or your own white-label domain
Cross-deviceYes. Start on a computer, finish on a phone
BrowsersAll browsers

Use the url field as Didit returns it. Do not build the URL from the session token.

async function startVerification() {  const response = await fetch('/api/create-verification', {    method: 'POST',    headers: { 'Content-Type': 'application/json' },    body: JSON.stringify({ userId: 'user-123' })  });  const { verificationUrl } = await response.json();  window.location.href = verificationUrl;}

Return

Read the result on the way back

Didit adds the session ID and the status to your callback URL.

The URL your user lands on

https://yourapp.com/verification-complete?verificationSessionId=abc123&status=Approved
Callback page
const params = new URLSearchParams(window.location.search);const sessionId = params.get('verificationSessionId');const status = params.get('status');
Treat these values as a hint. Anyone can edit a URL. Confirm the result on your server with the webhook, or call GET /v3/session/{sessionId}/decision/.

Which device goes back

callback_methodWho is sent to your callback
initiator
Only the device that started the flow. This is the default.
completer
The device that finished the flow, such as the phone after a QR code handoff.
both
Whichever device is active. The most reliable choice when users move from a computer to a phone.

The status value is the session status, such as Approved, Declined, In Review or Expired.

Questions

Questions about the redirect

When should I use the redirect?
Use it when a user may start on a computer and finish on a phone, when you need to support older browsers, or when the camera does not work inside an iframe.
Does the user leave my site?
Yes. The flow runs on verify.didit.me, or on your own white-label domain. Didit sends the user back to your callback URL at the end.
Can I trust the status in the callback URL?
Use it to choose what to show. Confirm the result on your server with the webhook or the decision endpoint before you grant access.
Which callback_method should I use?
Use both. It sends back whichever device is active, so it works when a user moves from a computer to a phone.
What query parameters arrive on the callback URL?
Didit appends verificationSessionId and status, for example ?verificationSessionId=abc123&status=Approved. The status is the session's current status, such as Approved, Declined, In Review or Expired. Treat both as untrusted user interface hints and confirm the decision on your server.
How do I create the session for a redirect?
Your backend calls POST https://verification.didit.me/v3/session/ with the x-api-key header, your workflow_id, a callback and optionally callback_method and vendor_data. The 201 response has a field named url: send the user there. Never build the URL from session_token by hand.
Can I open verification in a new tab instead?
Yes. Open the verification URL with window.open in a new tab to keep your app open while the user verifies. Didit recommends combining new tabs with webhooks so your backend knows when the verification completes, whatever the browser does afterwards.
Why is my callback never received?
Check that the callback URL was set correctly when you created the session, that it is reachable from the internet and that it has no typos or encoding issues. For cross-device flows, set callback_method so the right device is redirected.
How do I fix a redirect loop after verification?
Make sure your callback handler does not send the user back to the verification URL. Check for caching on your callback page, then clear the browser cache and try again. Decide the next page from the server-confirmed decision rather than from the query string alone.
Why is the status always Declined in my tests?
Check your workflow settings in the Didit Console and make sure the test documents you use are valid. Then fetch the session details through the API, using GET /v3/session/{session_id}/decision/, to see the specific decline reasons for each check.

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 a session

Create an account, create a session with your sandbox key and send the user to its URL.

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