You can integrate the Didit verification session into your web app in two ways:
- A redirect button that opens the session in a new tab or replaces the current page
- An embedded iframe that runs the flow directly inside your app layout
Both options use the verification_url returned from the Create Verification Session API.
π Redirect Button
Trigger a redirect to the Didit-hosted session. Once the verification is complete, the user is returned to the callback you defined during session creation.
<button
onClick={() => window.location.assign("{verification_url}")}
className="px-4 py-2 rounded-md bg-primary text-white"
>
Start Verification
</button>β Best for cross-device flows
π User returns to your app via
callbackafter verification
π© Callback Query Parameters
When the verification session finishes, Didit automatically appends the following query parameters to your callback URL:
https://yourapp.com/callback?verificationSessionId=0ee71b1d-4632-497d-8ab7-3bb01468a863&status=Approved
verificationSessionIdβ Unique ID of the verification sessionstatusβ One of:ApprovedDeclinedIn Review
You can use these values to update your backend or trigger specific flows.
π§± Embedded Iframe
Embed the session inside an iframe to keep the user on your site and deliver a seamless, branded experience
<iframe
src="{verification_url}"
style="width:100%; height:650px; border:none;"
allow="camera; microphone; fullscreen; autoplay; encrypted-media"
/>
Note: You must includeallow="camera; microphone; fullscreen; autoplay; encrypted-media"These permissions are required for liveness detection and biometric verification to work properly on all browsers.
β Best for apps with branded onboarding or single-page flows π¨ Fully customizable via logo, colors, domain β see white-label options
Example Implementation
- Next.js
