Flutter Liveness Detection with the Didit SDK (2026)
Use Didit's Flutter SDK (4.15.4) with a liveness workflow: your backend creates a session with POST /v3/session/, the SDK runs the capture, and you read liveness_checks[] from the decision.

Contents
In this guide
Jump to the part you need.
This guide fits Flutter developers who need a liveness check inside an iOS and Android app. It uses Didit's Flutter SDK 4.15.4, which pins the same native version, and passive liveness costs $0.10 per completed check inside a workflow. The main caveat is that your backend must create the session and read the decision, because the SDK runs the capture.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Item | Price (USD) | Unit |
|---|---|---|
| Passive Liveness, inside a workflow | $0.10 | check |
| Active Liveness, inside a workflow | $0.15 | check |
| Passive Liveness, standalone API | $0.10 | check |
| ID document verification | $0.15 | check |
| Face Match 1:1 | $0.05 | check |
| Device and IP analysis | $0.03 | check |
| Full ID check (KYC) | $0.33 | check |
| NFC passport chip reading | $0.15 | add-on check |
| Sandbox testing | Free, unlimited | session |
Start free in the sandbox at business.didit.me, no sales call required. If you work with a coding agent, connect Didit to your assistant through the Didit MCP server. The liveness documentation, including the three capture methods and the warning catalogue, is at docs.didit.me/core-technology/liveness, and every price quoted here is on didit.me/pricing.
What you build, and the method we recommend
The outcome is one call in your Flutter app that shows Didit's capture screen, decides whether a live person is in front of the camera, and returns a record you can store against the user. That record is a liveness check with a status, a method, a score and a list of risk warnings.
We recommend the session route with a native SDK. Create a workflow that contains a liveness node, create a session on your server, and hand the session to the Flutter SDK. The SDK opens the camera flow, and the decision arrives by webhook or from the decision endpoint. Native SDKs handle camera permissions and the capture screens themselves, and they have full access to device capabilities that a WebView does not. Didit runs identity checks for 4,000+ companies, and the Flutter package is one of four native SDKs, with a web SDK alongside them.
The second route, for apps that already collect a selfie, is the standalone passive liveness API. One HTTP call, one image, one verdict, no session and no SDK. Server to server, passive only, billed at $0.10 per call. There is no documented Flutter wrapper for this call, so you call it from your own backend with an HTTP client.
If your workflow runs other checks too, the liveness node sits inside the same session as ID verification, face match or NFC. You do not have to build a separate flow for it.
Prerequisites
- A Didit organization, created at business.didit.me.
- An API key from the console. The sandbox application gives you a free key for building and testing.
- Flutter 3.41+ and Dart 3.11+ (the current documented minimum for the SDK).
- iOS 13.0+ for the core flow, iOS 15.0+ if you also read NFC chips. Android API 23+ (Android 6.0).
- A workflow with a
LIVENESSfeature, and a method chosen:PASSIVE,ACTIVE_3DorFLASHING. - Credits on the organization before you switch from sandbox to live, because checks are billed per completed check.
- A backend you control, since the session is created server to server and the API key must not ship inside the app.
Step by step: liveness detection in Flutter with the Didit SDK
Step 1: Add the SDK
flutter pub add didit_sdk
The package is didit_sdk on pub.dev and it ships for iOS and Android. Read the Flutter SDK guide for the platform settings each target needs, and the native SDK overview for the version table. Flutter 4.15.4 pins native 4.15.4 and adds no new Dart API of its own, so capture behaviour follows the native layer documented in the release notes.
Step 2: Create a workflow with a liveness node
Do this once per configuration, not once per user, and store the returned workflow id.
curl -X POST https://verification.didit.me/v3/workflows/ \
-H "x-api-key: $DIDIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow_label": "Flutter liveness",
"workflow_type": "kyc",
"features": [
{"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE"}}
]
}'
Swap PASSIVE for ACTIVE_3D or FLASHING if you want the action or light-pattern method. You can also build the same workflow in the console, on the Workflows page, and pick the liveness method in the node settings.
Step 3: Create the session from your backend
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\": \"myapp://kyc/return\"}"
The response contains session_id, url and session_token. Send the session to the app. Pass vendor_data as your stable user identifier so the session binds to that user and duplicate detection works across sessions. Custom URL schemes such as myapp:// are always accepted as a callback; if you use an https callback, the origin has to be on your application's allowed domains or creation fails with a 400 on the callback.
Step 4: Open the flow in Flutter
Hand the session from step 3 to the SDK and open it from a screen the user triggered, so the camera opens on a deliberate tap. The SDK renders the intro, the camera capture and any action prompt. The exact session-start call for the package, with its parameter names, is in the Flutter SDK guide; the value it takes is the session your backend created in step 3, so no API key ever sits in the app.

Step 5: Handle the return to the app
When the flow ends, Didit sends the user back through the callback you set, appending verificationSessionId and status. Treat that redirect as a UI signal only. The decision comes from the API or the webhook, never from the redirect parameters.
Step 6: Register a webhook destination
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/webhooks/didit", "subscribed_events": ["status.updated"], "webhook_version": "v3"}'
Store the returned secret_shared_key and verify the X-Signature-V2 header on every delivery, which is an HMAC-SHA256 over the canonical JSON. Reject timestamps when abs(now - X-Timestamp) exceeds 300 seconds, de-duplicate on event_id, and answer within 5 seconds. The webhooks guide has the full envelope.
Step 7: Read the decision
curl https://verification.didit.me/v3/session/<SESSION_ID>/decision/ \
-H "x-api-key: <API_KEY>"
Liveness results are in the liveness_checks[] array, one entry per liveness node in the workflow, which is why the field is plural even when you only run one check. Fetch this endpoint as a fallback when a webhook does not arrive, and always branch on session_kind: user for KYC sessions, business for KYB sessions.
Step 8: Branch on the outcome
Approve on Approved, route to a human on In Review, refuse on Declined, and treat Abandoned, Expired and Kyc Expired as sessions that produced no verdict. Never treat a missing liveness_checks field as a pass: a feature that did not run is absent or null, not a placeholder.
Expected output
The decision mirrors the endpoint response and the webhook payload. For a session, the liveness documentation pins down two things on each liveness_checks[] entry: status, from the documented status enum, and the warnings[] risk codes. The rest of the nested record is defined in the canonical schema at the data models reference, under the liveness check entry.
{
"session_id": "<uuid>",
"session_kind": "user",
"status": "Approved",
"liveness_checks": [
{
"status": "Approved",
"warnings": []
}
]
}
The standalone call returns a different shape, and that one is documented field by field: a top-level request_id plus a liveness object carrying status, method, score, user_image (with entities and best_angle), warnings, face_quality and face_luminance. Do not assume the standalone shape maps one to one onto a session entry; read each surface from its own documentation.
{
"request_id": "<uuid>",
"liveness": {
"status": "Approved",
"method": "PASSIVE",
"score": "<score>",
"user_image": { "entities": "<entities>", "best_angle": "<angle>" },
"warnings": [],
"face_quality": "<value>",
"face_luminance": "<value>"
}
}
In the console the same record appears as a liveness panel on the session, next to the captured frame and the warning list.

Inputs and outputs
| Direction | Field | Where | Notes |
|---|---|---|---|
| Request | workflow_id | POST /v3/session/ | UUID, required |
| Request | vendor_data | POST /v3/session/ | Your stable user id |
| Request | callback | POST /v3/session/ | Deep link or an https URL on an allowed domain |
| Request | face_liveness_method | Workflow config | PASSIVE, ACTIVE_3D or FLASHING |
| Request | session_token | Flutter SDK | From the create-session response |
| Response | status | Decision | Approved, Declined, In Review, In Progress, Not Started, Abandoned, Kyc Expired |
| Response | liveness_checks[].status | Decision | One entry per liveness node, documented status enum |
| Response | liveness_checks[].method | Decision | The method that ran; see the data models reference for the full record |
| Response | warnings[] | Decision | Risk codes such as LIVENESS_FACE_ATTACK |
| Response | face_quality, face_luminance | Standalone liveness response | Documented on the passive-liveness API response |
| Webhook | X-Signature-V2 | Your endpoint | HMAC-SHA256 over canonical JSON |
Failure cases and how to recover
- HTTP 403 on a verification call. The key lacks permission or the organization is out of credits. Inspect the response body before retrying.
- HTTP 401 on a verification call. The API key is wrong, revoked or expired. Issue a new key and redeploy your backend.
- HTTP 400 when creating the session. Almost always a bad
workflow_idor a callback outside your allowed domains. Log the response body, it names the field. - HTTP 404 on the decision. The session does not exist or belongs to a different application, which usually means the app is pointing at the wrong environment.
DeclinedwithLIVENESS_FACE_ATTACKorLOW_LIVENESS_SCORE. Presentation attack suspected. Do not approve. Either refuse, or route to manual review if your policy allows a second look.FACE_IN_BLOCKLISTorDUPLICATED_FACE. Block, or send to review, according to your own policy.POSSIBLE_variants mean a partial match and deserve the same human step.NO_FACE_DETECTEDorMULTIPLE_FACES_DETECTED. Ask the person to retry with a single, well framed face. This is a capture problem, not a fraud verdict.- The user closes the app mid-flow. If the user abandons the flow or the session expires, read the resulting status and create a new session when your application needs another attempt.
- The webhook never arrives. If your endpoint takes longer than 5 seconds or answers 5xx, Didit retries twice, at about 1 and 4 minutes, then drops the delivery. Resend it from the destination's delivery log, and always keep the decision fetch as a fallback.

Paid steps and where manual review starts
Liveness is billed per completed check, from prepaid credit. Inside a workflow, passive liveness is $0.10 and active liveness is $0.15. The standalone passive liveness API is also $0.10 per call. Sandbox sessions are free and unlimited, so the whole build above costs nothing until you switch to a live key with credit on the organization. The Free plan gives $10 of credit a month to the first organization created with an eligible work email for a company domain, and phone verification codes are excluded from that credit.
A session reaches In Review when your workflow routes it there. The documentation does not publish numeric review thresholds, so that routing is a rule you configure and own, not a default the SDK applies. A reviewer decides in the console, and the record keeps the evidence: the reviews array lists manual review activity, status_override holds the automatic status a reviewer replaced, and decision_trace records whether the outcome was manual, automatic or investigator. Every session you route to a person costs review time that no per-check price covers.
Flutter liveness detection: passive, 3D action and flashing
Didit runs three anti-spoofing methods. Passive liveness analyses a single frame with a convolutional network and looks for texture and artefact cues, which the documentation rates as standard security and suitable for low-risk onboarding. 3D flashing projects a light pattern at over 30 frames per second and reads the reflections to build a depth map. That catches screen replays and printed photos, and the person only has to look at the camera. 3D action and flash adds a randomised action such as a blink or a nod on top of the light pattern, and it is the documented highest-security option, with our methods table listing banking, healthcare and government applications as its best-for examples.
Our liveness documentation reports 99.9% accuracy with a false acceptance rate under 0.1%, and iBeta Level 1 and Level 2 testing. Pick the lightest method your risk model tolerates, and let the warnings do the rest.
Worked cost example
Say 20,000 users a month each run a liveness step.
- Passive liveness only: 20,000 x $0.10 = $2,000.00.
- The same on the Growth plan at 4% off: 20,000 x $0.096 = $1,920.00 of usage. The $115 monthly plan credit offsets usage rather than adding to the cost, and the $99 monthly fee is billed separately from usage.
- Active liveness instead: 20,000 x $0.15 = $3,000.00.
- Standalone passive liveness API, one call per selfie: 20,000 x $0.10 = $2,000.00.
- Full KYC check, which is $0.15 ID document + $0.10 passive liveness + $0.05 face match + $0.03 device and IP analysis = $0.33: 20,000 x $0.33 = $6,600.00.
- The same full KYC on the Scale plan at 10% off: 20,000 x $0.297 = $5,940.00 of usage. The $350 monthly plan credit offsets usage rather than adding to the cost, and the $299 monthly fee is billed separately from usage.
Add $0.15 per check if you also read an NFC chip. Nothing above includes manual review time.
Sources
- Didit docs: Native mobile KYC SDKs, iOS, Android, RN, Flutter
- Didit docs: Flutter SDK guide
- Didit docs: Liveness detection overview and integration prompt
- Didit docs: Liveness warnings catalogue
- Didit docs: Liveness report reference
- Didit docs: Data models and the canonical liveness check schema
- Didit docs: Quick start
- Didit docs: Create session API
- Didit docs: Retrieve session decision API
- Didit docs: Webhooks and HMAC signing
- Didit docs: Verification statuses
- Didit docs: Sandbox testing
- Didit pricing page and pricing as JSON, read November 26, 2026
- Didit MCP server setup
Next step: create your free organization at business.didit.me, build a workflow with a liveness node, and run one sandbox session from your Flutter app. No sales call, and the sandbox is free.
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
Alejandro Rosas
Co-founder and CTO

Questions
Frequently asked questions
How do I add liveness detection to a Flutter app with Didit?
Add the didit_sdk package, create a workflow with a LIVENESS feature, create a session from your backend with POST /v3/session/, and open that session from the SDK. The decision arrives by webhook or from GET /v3/session/{session_id}/decision/ in the liveness_checks[] array. Create the session on your backend so the API key never ships in the app, hand the session to the SDK, and read the result from the decision endpoint or a webhook rather than from the redirect parameters.
Which Flutter and platform versions does the Didit SDK require?
The current release is 4.15.4 and it requires Flutter 3.41+ and Dart 3.11+. On the platform side you need iOS 13.0+ for the core flow and iOS 15.0+ for NFC, and Android API 23+ (Android 6.0). iOS, Android and React Native ship at the same 4.15.4 version.
How much does liveness detection cost per check?
Passive liveness inside a workflow is $0.10 per completed check and active liveness is $0.15. The standalone passive liveness API is $0.10 per call. A full KYC check with ID document, passive liveness, face match and device analysis is $0.33. Sandbox testing is free and unlimited.
What is the difference between passive, 3D action and flashing liveness?
Passive liveness reads a single frame and looks for spoofing artefacts, so it asks nothing of the user and carries standard security. 3D flashing projects a light pattern and reads the reflections as a depth map, which catches flat photos and screen replays. 3D action and flash adds a randomised prompt such as a blink or a nod on top of the light pattern and is the strongest of the three.
What does a liveness face-attack warning mean?
It means the liveness check found evidence of a presentation attack, such as a photo, a screen replay, a mask or a deepfake, and the liveness status comes back as Declined with the LIVENESS_FACE_ATTACK code in the warnings. The right handling is to refuse the attempt or route it to manual review, never to approve it. The full risk code catalogue is in the liveness warnings reference.
Can I run liveness in Flutter without a session and SDK?
Yes, for passive liveness only. Send the captured selfie as multipart form data to POST https://verification.didit.me/v3/passive-liveness/ with your API key, and you get back a liveness object with status, method, score, warnings, face quality and luminance. It is documented as a server-to-server call at $0.10 per check, so call it from your backend rather than from the app.
Which liveness warnings should trigger manual review?
Send FACE_IN_BLOCKLIST, POSSIBLE_FACE_IN_BLOCKLIST, DUPLICATED_FACE and POSSIBLE_DUPLICATED_FACE to review when your policy allows a second look, since these are identity and duplicate signals rather than capture errors. Handle NO_FACE_DETECTED and MULTIPLE_FACES_DETECTED by asking the user to retry with one well framed face. Write the mapping down before launch and store it, so the same warning always gets the same treatment.
Does the Flutter SDK ask for biometric consent before the face capture?
It can. For people covered by Illinois, Texas or Colorado law, Didit can ask for explicit biometric consent before the first face capture when the session carries the person's state, and native SDK 4.10.0 or later is required. Flutter 4.15.4 pins native 4.15.4, so the step is available. If a native build below 4.10.0 runs the session, the decision reports the consent as pending with reason BIOMETRIC_CONSENT_UNSUPPORTED_SDK.
Is the sandbox free, and can I test a declined liveness attempt?
Sandbox testing is free and unlimited, and sandbox applications build and test without spending credit. Sandbox sessions can be armed with a scenario through sandbox_scenario on create, or re-armed while the session is still Not Started, so you can reproduce outcomes without faking images. Scenario slugs come from GET /v1/sandbox/scenarios/ and are rejected on live applications.
How much does the Free plan credit cover?
The Free plan gives $10 of credit a month to the first organization created with an eligible work email for a company domain. Unused monthly credit does not roll over, and phone verification codes are excluded from it. The sandbox stays free and unlimited on every plan.
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


