Skip to main content

Didit JS SDK vs Iframe vs Redirect: Web KYC Integration, 2026

The JavaScript SDK gives full control, the iframe the fastest setup, and redirect covers cross-device flows. All three deliver signed results by webhook. A full KYC check is $0.33 at list price.

Didit JS SDK vs Iframe vs Redirect: Web KYC Integration, 2026

Contents

In this guide

Jump to the part you need.

Use the Didit JavaScript SDK for full control, the InContext iframe for a UniLink live in under a minute, and redirect for browser compatibility or a cross-device journey. All three send the signed decision by webhook. A full KYC check is $0.33 at list price. The Free plan gives $10 in monthly credit for the first eligible organization created with a work email; phone codes are excluded. Self-serve plans need no contract; Enterprise is annual from $15,000 a year.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

Choose your web integration

Choose the Didit web integration: JavaScript SDK, InContext iframe or redirect. Every method delivers the final signed decision by webhook.
MethodSetup timeBackendWhere users complete the flowBest forFrontend eventsWhite-labelDecision delivery
JavaScript SDK3 minutesOptionalInside your page, modal or inlineProduction web apps that need real-time events and full controlSDK callbacksYesSigned webhook
InContext iframeUnder 1 minuteOptionalInside your page in an iframeUniLink checks on static pages and quick prototypespostMessageYesSigned webhook
Redirect5 minutesYesOn the Didit-hosted pageBrowser compatibility and journeys that may move across devicesReturn callbackYesSigned webhook

The table describes the in-browser experience. In all three methods, the final signed decision arrives by webhook. A browser event updates your interface; it does not authorize the user.

Start free in the Didit sandbox with no sales call. For build-time help, connect Didit to an AI assistant through the MCP server. The User Verification journey guide shows what your users see, and didit.me/pricing lists every unit price.

What each method actually is

We host the verification flow. Your job is to get the user into a session and to receive the decision. The three web methods differ in backend setup, where users complete capture, and which frontend events your app receives.

The SDK and iframe accept a UniLink without a session-creation call from your backend. For API-created sessions, call POST /v3/session/ from your backend. It returns session_id, url and session_token. Use vendor_data to link the session to your user and set callback if you want a session-specific return URL.

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_UUID", "vendor_data": "user-42", "callback": "https://myapp.com/kyc/return"}'

Replace YOUR_WORKFLOW_UUID with the workflow UUID from your console before running the call. An invalid workflow id returns HTTP 400.

After that call, the choice is how you open the returned url. The verification workflow is shared across methods, while the user-facing container and event handling differ.

The Didit verification screens a user sees, from document capture to the result page
The verification workflow is shared across methods, while the user-facing container and event handling differ.

JavaScript SDK: full control in three minutes

The SDK is a package you install, @didit-protocol/sdk-web. It opens the flow inside your page in a modal or inline, and it hands you events as they happen: completed, cancelled and failed.

  • Session management and event callbacks inside your own bundle.
  • React, Vue, Angular, Next.js, Nuxt, Svelte and vanilla JS support, with full TypeScript types.
  • Modal and inline modes, so the check can sit in a settings page or take over the screen.
  • Backend optional, because you can pass a UniLink URL instead of creating a session server-side.
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'
});

Example deployment: a React signup form opens the SDK in a modal. If the user cancels, the signup form stays on screen with a resume button. If the flow completes, the page shows a pending state while your server waits for the verified webhook. The SDK event updates the interface; the webhook decides.

Pick the SDK when the check has to feel like part of your product, when you want to react to a cancellation in the page instead of on a callback screen, and when one codebase has to serve several frameworks. The JavaScript SDK guide lists every option, and the single GitHub repository of framework examples covers React, Vue, Angular, Next.js, Nuxt, Svelte and vanilla JS.

InContext iframe: a live check in under a minute

The iframe embeds the same flow with no npm package and no build step. In its simplest form you copy one tag and one workflow link.

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

There are two modes. A UniLink needs no backend for capture: the workflow link does the work, which is why setup is under a minute. An API session gives you the same customization as the SDK, including a callback URL and metadata on the session.

Include the full allow attribute shown above. If camera access is a problem in the iframe, use redirect.

Example deployment: a static marketing page for a regulated product embeds a UniLink iframe. The user completes the check without leaving the page. Your server receives the decision by webhook, because the page itself does not authorize the user.

Full details are in the InContext iframe guide.

Redirect: compatibility and cross-device journeys

Redirect sends the user to the Didit-hosted verification page and brings them back to your callback when they finish.

// After creating a session via your backend
window.location.href = verificationUrl;

Two things to know before you choose it. A backend is required, because the session has to be created server-side. And the user leaves your domain, so the callback returns them with ?verificationSessionId={session_id}&status={status} appended to your URL.

If you configure allowed domains, a session-level HTTP or HTTPS callback must match an allowed origin exactly, including scheme, host and port. An out-of-policy session callback returns HTTP 400. An out-of-policy workflow default is ignored. Custom URL schemes are accepted.

Choose redirect when browser compatibility is the priority or when iframe camera access is a problem. All three methods support cross-device verification, and redirect is the documented option when a journey may start on a desktop and finish on a phone.

Example deployment: an account recovery journey starts on desktop and finishes on a phone. The backend creates the session, the user opens the hosted URL, and the callback returns according to callback_method, which can target the initiator, the completer or both.

See the redirect guide.

Which one should you pick?

  • Production web app with one verification flow and real-time UI: JavaScript SDK. It is the documented recommendation for production web apps.
  • Landing page, prototype, or a check inside a page you do not want to rewrite: iframe with a UniLink.
  • Browser compatibility priority, iframe camera problems, or a journey that may continue on another device: redirect.
  • WordPress, WooCommerce, Shopify or Salesforce: the dedicated plugin, not one of the three above.
  • Native iOS or Android with no native SDK: WebView, which the docs list at 15 minutes.

Start with the SDK for a production web app. Choose redirect first when compatibility or a cross-device journey drives the decision. You can generally move from redirect to the SDK while keeping the same webhook destination, subject to your implementation.

Changing methods later

You do not have to rebuild the decision path. If you start with an API-created redirect, you can move to the SDK by passing the returned session URL to the SDK. Keep the existing verified webhook flow. The session creation call and the webhook code stay the same when you switch containers.

What all three share: signed webhooks and statuses

Process verified webhooks on your server. If a delivery is missing, retrieve the decision with GET /v3/session/{session_id}/decision/. Register a destination with the event families you want. There is no wildcard, so every family has to be listed.

curl -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"}'

Verify X-Signature-V2 against the HMAC-SHA256 of sorted, Unicode-preserved canonical JSON. Compare signatures in constant time and reject timestamps more than five minutes ahead of or behind your server clock. De-duplicate on event_id and answer within 5 seconds. If your handler is slower, or returns a 5xx or a 404, Didit retries twice, after about 1 minute and about 4 minutes, then drops the delivery. You resend it from the destination's delivery log.

Statuses are exact, case-sensitive strings: Not Started, In Progress, Approved, Declined, In Review, Awaiting User, Resubmitted, Expired, Abandoned and Kyc Expired, which uses a single capital K. Match them exactly in your code, and treat Abandoned as a real outcome rather than an error.

The decision carries plural arrays such as id_verifications[], liveness_checks[], face_matches[] and aml_screenings[], because one workflow can run the same feature twice. If a webhook is lost, the decision endpoint returns the same shape. The webhook documentation and the status reference are the two pages your backend engineers should open first.

A verification session overview with its warnings in the Didit Business Console
The same decision your webhook receives is visible on the session in the console.

White-label on all three

Your logo, colors, typography and a custom domain are available on every plan and on all three web methods. White Label is billed at $0.10 per completed check at list price. The white-label guide covers branding, plan availability and custom domains.

If you pick redirect, the default is a hosted URL. White-label custom domain configuration is available, so check that your compliance team accepts a hosted page or approves the custom domain before you choose redirect purely for setup speed.

Worked cost example

Take 10,000 full KYC checks in a month. A full KYC check on Didit is always three parts in one check, and the price feed breaks them out:

  • ID document verification: $0.15
  • Passive liveness: $0.10
  • Face match 1:1: $0.05
  • Device and IP analysis: $0.03
  • Sum per check: $0.15 + $0.10 + $0.05 + $0.03 = $0.33

Gross list-price usage is 10,000 x $0.33 = $3,300.00. If the organization is the first eligible Free organization created with a work email and the full $10 monthly credit is available, remaining prepaid usage is $3,300.00 - $10.00 = $3,290.00. Phone codes are excluded from Free plan credit; the KYC check above does not include phone codes.

Add the optional White Label flow at $0.10 per completed check. The combined price is $0.33 + $0.10 = $0.43 per check. At 10,000 checks, gross list-price usage is 10,000 x $0.43 = $4,300.00, or $4,290.00 in remaining prepaid usage after the same eligible $10 credit. If you need AML screening at $0.20 per check, the compliance bundle price is $0.33 + $0.20 = $0.53 per check, or $5,300.00 gross at 10,000 checks.

Plan credit is separate from usage. On Scale, the list price is reduced by 10% and the monthly fee includes $350 of credit applied before top-ups. The Scale KYC rate is $0.33 x 0.9 = $0.297.

Didit full KYC checks at three volumes. The Scale column shows usage at Scale rates before plan credit.
VolumeDidit at list, $0.33Usage at Scale rates before plan credit, $0.297
1,0001,000 x $0.33 = $330.001,000 x $0.297 = $297.00
10,00010,000 x $0.33 = $3,300.0010,000 x $0.297 = $2,970.00
100,000100,000 x $0.33 = $33,000.00100,000 x $0.297 = $29,700.00

Plan fees are separate from usage. Growth is $99 a month with $115 of monthly credit and 4% off every Didit price. Scale is $299 a month with $350 of monthly credit and 10% off. Enterprise is a custom annual contract starting at $15,000 a year. Plan credit is added monthly and does not roll over; top-ups last 12 months.

How Didit billing works with credits, auto-recharge and volume discounts
Credits, plan discounts and top-ups, explained in the billing lesson.

Why teams pick Didit for web verification

Didit publishes a public price list, so you can calculate a web integration before you talk to sales. The sandbox is free on every plan. A full KYC check is $0.33 at list price. More than 4,000 companies use Didit. Verification coverage is 220+ countries and territories, with 14,000+ document types and 1,300+ AML lists.

Evidence and certifications: SOC 2 Type 2, ISO/IEC 27001:2022 certified, and iBeta Level 1 PAD. The SOC 2 Type 2 report is shared under NDA. These claims describe the compliance program, not a guarantee that every workflow in every country is available without configuration.

Limits to plan for: the browser event is not the decision, so you need a server-side webhook endpoint. Redirect requires a backend to create the session. Iframe camera access can be a problem in some environments, and redirect is the documented fallback. KYB is priced by country and data tier from $2.00 per company, so price your own markets rather than reading one number.

MCP and the developer workflow

Connect an AI assistant through our MCP server and use the Didit integration prompt to build and test the flow. The MCP server is hosted at https://mcp.didit.me/mcp with OAuth sign-in. The public OpenAPI contract lets the assistant check fields and status values before it writes code.

An AI assistant connected to Didit through the MCP server
Connecting an AI assistant to Didit through the MCP server.

Sources

Start free in the Didit sandbox and run a test verification through your chosen web integration. No sales call required.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

What is the difference between the Didit JavaScript SDK, iframe and redirect?

All three open the same Didit verification flow: the JavaScript SDK renders it inside your app with real-time events and full control, and the InContext iframe embeds it with one HTML tag and delivers events by postMessage. Redirect sends the user to a hosted page. Redirect requires a backend to create the session. All three methods support cross-device verification.

How long does each Didit web integration take to set up?

The documented setup times are 3 minutes for the JavaScript SDK, under 1 minute for the InContext iframe and 5 minutes for the redirect. The iframe is fastest because a UniLink workflow URL needs no backend. WebView for iOS and Android is listed at 15 minutes, and the WordPress, Shopify and Salesforce plugins at 5, 5 and 10 minutes.

Does the Didit iframe work without a backend?

A UniLink session needs no backend for capture: you embed the workflow link in the iframe and Didit handles the session. To receive the decision programmatically, use a webhook endpoint on your server or call GET /v3/session/{session_id}/decision/ from your server. Console review is a manual route, not a server-side integration. If you want a custom callback, metadata or prefilled details, create the session with POST /v3/session/ and use the returned URL instead.

Can I keep users on my own domain with Didit?

Yes, with the JavaScript SDK or the InContext iframe, which both render inside your page and can be white-labelled with your logo, colors and typography. Redirect uses the default hosted URL, and white-label custom domain configuration is available there too. White Label is billed at $0.10 per completed check at list price.

How do I receive the verification result in my app?

Process verified webhooks on your server. If a delivery is missing, retrieve the decision with GET /v3/session/{session_id}/decision/. The in-browser events, whether SDK callbacks, postMessage or a return callback, update the interface and should not be the record you use to authorize the user.

Does SDK completion mean the user is Approved?

No. The SDK completed event means the browser flow finished, and it updates your interface. Approval is the Approved status in the verified webhook or the decision endpoint. Grant access only after your server verifies that server-side response.

Is the Didit verification flow white-label?

Yes. Logo, colors, typography and a custom domain are available on every plan and on the SDK, iframe and redirect methods. White Label is billed at $0.10 per completed check at list price. The white-label guide covers branding, plan availability and custom domains.

How much does a Didit web KYC check cost?

A full KYC check is $0.33 at list price: ID document verification at $0.15, passive liveness at $0.10, face match at $0.05 and device and IP analysis at $0.03. The price is the same whichever web method you choose, because the method is only the container. The Free plan gives $10 in monthly credit to the first eligible organization created with a work email, phone codes are excluded, and self-serve plans need no contract; Enterprise is an annual contract from $15,000 a year.

Does Didit support cross-device verification?

Yes, all three methods support cross-device verification. Redirect is the documented choice when a journey may start on one device and finish on another. callback_method controls whether the callback fires for the initiating device, the completing device or both.

Which Didit integration should I use with React or Next.js?

Use the JavaScript SDK for React and Next.js. It supports full TypeScript types and modal and inline modes. The single GitHub repository of framework examples covers React, Next.js and the other supported frameworks.

Can I integrate Didit with an AI coding assistant?

Yes. Connect an AI assistant through our MCP server and use the Didit integration prompt to build and test the flow. The MCP server is hosted at https://mcp.didit.me/mcp with OAuth sign-in. The public OpenAPI contract lets the assistant check fields and status values before it writes code.

What happens if a user abandons the Didit flow?

Didit marks a session Abandoned when the user starts verification and fails to finish in time. Your app can receive that status through the status.updated webhook. Expired means the user never opened the link before its time limit.

Can I change from redirect to the SDK later?

Yes. If you start with an API-created redirect, you can move to the SDK by passing the returned session URL to the SDK. Keep the existing verified webhook flow, because the decision path does not change when you switch containers.

What are the callback rules for redirect?

If you configure allowed domains, a session-level HTTP or HTTPS callback must match an allowed origin exactly, including scheme, host and port. An out-of-policy session callback returns HTTP 400. An out-of-policy workflow default is ignored. Custom URL schemes are accepted.

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.

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.

Verify your first user today.

Start free

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