Skip to main content

Liveness Detection in React Native with the Didit SDK (2026)

Create a session on your backend, set face_liveness_method, start verification with the Didit React Native SDK, then read liveness_checks[]. Passive liveness is $0.10 per check, active $0.15.

Liveness Detection in React Native with the Didit SDK (2026)

Contents

In this guide

Jump to the part you need.

This guide is for teams shipping a React Native app who want liveness detection inside their own screens, not a redirect to a browser tab. The Didit React Native SDK wraps our native iOS and Android SDKs, so passive liveness costs $0.10 per completed check and Active Liveness $0.15. The caveat up front: the SDK needs a session token that only your backend can create, so your API key never ships inside the app.

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

Summary: what liveness costs inside a React Native app

Liveness and related lines for a React Native integration, USD list prices on November 26, 2026
What you runPriceUnitNotes
Passive liveness inside a session$0.10checkSingle frame analysis, no action beyond the selfie
Active Liveness inside a session, run as the ACTIVE_3D or FLASHING workflow method$0.15checkRandom action, projected light pattern, or both
Full ID check (KYC) with passive liveness$0.33checkID document $0.15, passive liveness $0.10, face match $0.05, device and IP $0.03
Standalone passive liveness APIPay-per-usecallServer to server, for a selfie you already captured; billed per call from prepaid credit
NFC chip reading$0.15checkAdd-on to a document check; on iOS it needs 15.0 or later, Android NFC has its own documented requirements
React Native SDKFreeincludednpm package that wraps the native SDKs

Start free in the sandbox at business.didit.me, no sales call required, and sandbox runs consume no credits. If you work with a coding agent, connect Didit through the Didit MCP server so it can scaffold the session call for you. Liveness runs inside Didit identity verification, and every number in this guide is on the public list at didit.me/pricing.

What you end up with, and the method we recommend

The finished flow is short. A user taps a button in your React Native screen, our native verification UI opens on top of your app, the camera captures the face, the workflow runs the liveness method you configured, and your backend receives a decision object with a liveness_checks[] array. You never render the camera yourself and you never handle the biometric frames.

The intro screen users see before the liveness selfie starts
The liveness step opens from your app and runs in the native UI, so camera permissions and framing stay our problem.

We recommend the session flow with the native SDK for anything user-facing. Sessions are what the hosted flow runs, and the documentation states that native SDKs are preferred over WebView integration because they handle camera permissions, NFC reading and liveness capture on the device. The liveness overview and integration prompt covers the session route, and the standalone passive liveness page covers the server-to-server route, with the session architecture itself described in the SDK and integration docs.

Use the standalone endpoint only when your own app already captured the selfie and you want a one-shot check. It is passive only: one image in, one liveness verdict out. Didit reports 4,000+ active customers, and the React Native SDK wraps the native iOS and Android SDKs rather than replacing them.

Prerequisites

  • React Native 0.76 or later on the New Architecture. The package is a cross-platform TypeScript API that wraps the native iOS and Android SDKs.
  • iOS 13.0 or later, Android API 24 or later. NFC reading needs iOS 15.0 or later on iOS, and Android NFC support has separate requirements documented in the Android SDK guide.
  • A Didit application with an API key and a workflow ID. The workflow ID is a UUID you create once and reuse.
  • A backend you control, because POST /v3/session/ is authenticated with x-api-key and that key cannot live in a mobile binary.
  • An Expo development build if you use Expo, since the SDK ships an Expo config plugin and the docs state a development build is required.
  • Native SDK 4.10.0 or later if you verify people in Illinois, Texas or Colorado, where biometric consent has to be asked before the first face capture.

Step by step: liveness detection in React Native

  1. Set the liveness method on the workflow. The workflow, not the app, decides which method runs. Set face_liveness_method to PASSIVE, ACTIVE_3D or FLASHING in the Didit Business Console, or through POST /v3/workflows/. ACTIVE_3D and FLASHING are separate workflow methods, not one setting under two names: ACTIVE_3D asks for a random action such as a blink or a nod while projecting a light pattern at the face, and FLASHING uses the light pattern only. PASSIVE analyses a single frame. On the price list, Active Liveness is one published line at $0.15 and Passive Liveness is $0.10, so the method decides which line you consume.

  2. Install the SDK in the app. The npm package is the same for iOS and Android, and the React Native SDK guide has the platform setup for each target.

    npm install @didit-protocol/sdk-react-native

    If the app runs on Expo, the package ships a config plugin and you need a development build. Rebuild the native project after installing.

  3. Create the session on your backend. Send the workflow ID, your own user ID and an optional callback. The response carries session_id, session_token, verification_url and a status of Not Started.

    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",
        "vendor_data": "internal-user-id",
        "callback": "https://myapp.com/done"
      }'

    Pass the session_token to the app. Never pass the API key.

  4. Start verification in the React Native screen. The documented call takes the session token from the previous step. The SDK opens the native verification UI and settles when the flow closes, and the React Native SDK guide shows the call in a full component.

    DiditSdk.startVerification(token: session_token)

    Version 4.15.3 fixed startVerification and startVerificationWithWorkflow on Android: if the app is sent to the background, the call now waits until the app is back in the foreground before opening the verification screen, and always settles. Pin 4.15.3 or later.

  5. Read the decision. Either poll the decision endpoint from your backend or subscribe to the session.status.updated webhook. The decision endpoint takes the session ID and the API key.

    curl https://verification.didit.me/v3/session/SESSION_ID/decision/ \
      -H "x-api-key: API_KEY"
  6. Branch on the liveness result. Read liveness_checks[] on the decision payload, one entry per liveness node, each with a status from Not Started, In Progress, Approved, In Review, Declined, Abandoned or Kyc Expired. The full field list is in the schema at /reference/data-models#liveness-check and the per-feature report is at /core-technology/liveness/report-liveness.

  7. Read the warning codes with their severity in mind. In the standalone passive liveness API, any error-severity warning sets the status to Declined: NO_FACE_DETECTED, LOW_LIVENESS_SCORE (score at or below face_liveness_score_decline_threshold, default 30), LIVENESS_FACE_ATTACK, and FACE_IN_BLOCKLIST or POSSIBLE_FACE_IN_BLOCKLIST. MULTIPLE_FACES_DETECTED is warning severity and does not decline, and DUPLICATED_FACE or POSSIBLE_DUPLICATED_FACE are information severity that never decline on their own. For those last two groups your product decides whether to approve, retry or route to a reviewer, and the full code list is in the warning catalogue.

  8. Test in the sandbox, then switch the key. Sandbox API keys skip processing and billing, so you can run the whole flow, including the retry paths, without spending credit. Replace the key and the workflow ID with live values when the flow works end to end.

The face capture screen during a liveness check
Capture and analysis happen in the native SDK. Your app only waits for the call to settle.

The standalone passive liveness call

If your app already captured a selfie and you want a one-shot check, call the passive liveness endpoint server to server. This is the documented request.

curl -X POST 'https://verification.didit.me/v3/passive-liveness/' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'user_image=@./selfie.jpg' \
-F 'save_api_request=true' \
-F 'vendor_data=user-123'

The image must be tiff, jpg, jpeg, png or webp and no larger than 5 MB. PDFs are not accepted. The endpoint is billed per call from prepaid credit, with no monthly minimum, so confirm the current line on the public price list before you budget against it. With save_api_request=true, which is the default, the call is persisted as an API session, the face is stored and enrolled in your face search index, and later duplicate checks can match it. Set it to false for a one-shot check that stores nothing.

Expected output

The standalone endpoint returns this shape. The field names are fixed, the values below are illustrative.

{
  "request_id": "8f2c1a44-0000-0000-0000-000000000000",
  "liveness": {
    "status": "Approved",
    "method": "PASSIVE",
    "score": 98,
    "warnings": [],
    "face_quality": 91,
    "face_luminance": 74
  }
}

On a session flow the same verdict arrives inside liveness_checks[] on the decision payload, trimmed here to the field this guide reads.

{
  "session_id": "8f2c1a44-0000-0000-0000-000000000000",
  "status": "Approved",
  "liveness_checks": [
    { "status": "Approved" }
  ]
}

A full ID check session also carries the ID document, face match and device signals in their own arrays. Didit Liveness Detection states 99.9% accuracy, a false acceptance rate under 0.1%, and iBeta Level 1 and Level 2.

A liveness result shown on a session page in the Didit Business Console
Every session shows its liveness result and warnings in the Didit Business Console, which is where your reviewers look.

Inputs and outputs

Fields you send when you create a session, and fields you read from the decision
FieldDirectionWhat it does
workflow_idCreate session, requiredSelects the workflow, and with it the liveness method and thresholds
vendor_dataCreate session, recommendedYour stable user ID, binds sessions and drives duplicate detection
callbackCreate session, optionalWhere the flow returns, with verificationSessionId and status appended
languageCreate session, optionalISO 639-1 code for the verification UI, browser detection by default
user_stateCreate session, optionalUS state or ISO 3166-2 code, used to trigger biometric consent in Illinois, Texas and Colorado
liveness_checks[].statusDecisionPer liveness node status, from Not Started to Declined
warnings[]Decision and standalone responseRisk codes such as LOW_LIVENESS_SCORE, LIVENESS_FACE_ATTACK or FACE_IN_BLOCKLIST
liveness.scoreStandalone response0 to 100. The status is Declined when the score is at or below face_liveness_score_decline_threshold, default 30
face_quality, face_luminanceStandalone responseCapture quality and lighting, 0 to 100, nullable

Failure cases and recovery

What each failure means and what to do about it
SignalWhat it meansRecovery
HTTP 403Two causes share the code. Insufficient balance is returned before any image processing. On the standalone passive liveness endpoint a missing or invalid API key also returns 403, and that endpoint never returns 401. The session decision endpoint can return 401 for an invalid API key.Top up and retry if it was balance, because nothing was charged. Check the x-api-key header if it was credentials.
HTTP 400Missing user_image, file over 5 MB, unsupported extensionRe-capture or resize. Allowed types are tiff, jpg, jpeg, png and webp.
Declined with LIVENESS_FACE_ATTACK, LOW_LIVENESS_SCORE or NO_FACE_DETECTEDAn error-severity warning fired and the status is Declined. LOW_LIVENESS_SCORE means the score is at or below the configured decline threshold, default 30.Do not approve. Allow one retry with better framing and light, then route to review under your policy.
FACE_IN_BLOCKLIST or POSSIBLE_FACE_IN_BLOCKLISTThe face matches an entry on your face blocklist. This is error severity, so the call is Declined.Block the account, or send it to a reviewer who can override the status.
MULTIPLE_FACES_DETECTEDWarning severity: more than one face in frame. It does not decline on its own.Ask for a retry with a single, well framed face.
DUPLICATED_FACE or POSSIBLE_DUPLICATED_FACEInformation severity: the same face already appeared in another approved session. These never decline on their own.Apply your duplicate-account policy: approve, link the records, or route to review.
HTTP 429Over the shared write budget of 300 requests per minute per API keyBack off and retry the request.
biometric_consent.status is pendingBIOMETRIC_CONSENT_UNSUPPORTED_SDK, the native SDK is below 4.10.0Upgrade if you verify people in Illinois, Texas or Colorado.
HTTP 404 on the decisionWrong session ID, or the session belongs to another applicationCheck that the ID and the API key come from the same application.

One more behavioural note from the SDK changelog: React Native 4.15.3 pins native 4.15.3 and adds no JavaScript API, so a fix that matters to you, such as the Android background handling above, arrives through the pinned native version. Keep the package on a single minor version across iOS and Android.

Billing is per completed check, taken from prepaid credit. The liveness step is charged once per check: $0.10 for passive liveness, $0.15 for Active Liveness, whichever workflow method ran. The standalone passive liveness endpoint is its own pay-per-use line, and each 200 response consumes one credit from your plan credit or top-up balance, so a result that comes back Declined is still billed because the model ran. A request refused with 403 for insufficient balance is not billed, because no image was processed. Confirm the current standalone line on the public price list before you build a budget on it.

What we do not decide for you is your risk policy. Didit runs the model, returns the score and the warning codes, and applies the thresholds you configure. A session that lands in In Review is a human decision inside the Didit Business Console, with an assignee, a waiting time and an SLA clock on the record, and the decision payload exposes that activity in reviews[], assignee, waiting_since and sla_due_at. A reviewer can change a status by hand, and the decision then carries status_override next to the automatic_status it replaced, so both readings stay in the audit trail. Free plan credit is $10.00 a month for eligible organizations, and sandbox runs are free and unlimited on every plan.

Worked cost example

Suppose 20,000 people a month complete a full ID check in your React Native app and the workflow runs passive liveness. The arithmetic is shown line by line so you can check it against the price list.

  • One full ID check: $0.15 ID document + $0.10 passive liveness + $0.05 face match + $0.03 device and IP = $0.33
  • 20,000 checks: 20,000 x $0.33 = $6,600.00 per month
  • Separately, 20,000 active liveness checks: 20,000 x $0.15 = $3,000.00

On the Scale plan, which takes 10% off every Didit price: $0.33 x 0.9 = $0.297, so 20,000 x $0.297 = $5,940.00. Scale costs $299.00 a month and includes $350.00 of monthly credit, which covers part of that usage, and unused monthly credit does not roll over. Growth takes 4% off instead: $0.33 x 0.96 = $0.3168, so 20,000 x $0.3168 = $6,336.00, against a $99.00 monthly fee and $115.00 of credit. The Free plan starts with $10.00 of credit a month. Any standalone passive liveness calls you add are billed per call on their own line, so price those from the live feed rather than from this example.

Sources

Next step: open the sandbox at business.didit.me, create a workflow with the liveness method you want, and run one test session from a development build. It takes minutes and there is no sales call in the path.

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

Alejandro Rosas

Co-founder and CTO

Alejandro Rosas

Alejandro Rosas

Co-founder and CTO

About Didit

Questions

Frequently asked questions

How do I add liveness detection to a React Native app with Didit?

Install @didit-protocol/sdk-react-native, create a session on your backend with POST /v3/session/, then call DiditSdk.startVerification with the session token the backend returns. The workflow's face_liveness_method decides whether the user gets passive, 3D action or flashing liveness. Your backend then reads liveness_checks[] from the decision endpoint or from the session.status.updated webhook.

Is there a 3D liveness detection SDK for React Native?

Yes. A Didit workflow can run ACTIVE_3D, which combines a randomized action such as a blink or a nod with a projected light pattern and is the highest security method, or FLASHING, which uses light patterns only at high security. Both are separate workflow methods selected with face_liveness_method, so the method the app runs changes when you point it at a different workflow. Both bill the published Active Liveness line at $0.15 per check, while passive liveness is $0.10.

What does liveness detection cost per check?

Passive liveness is $0.10 per completed check and Active Liveness is $0.15, billed from prepaid credit. A full ID check that bundles ID document verification, passive liveness, face match and device and IP analysis is $0.33. The standalone passive liveness endpoint is a separate pay-per-use line priced per call, and the React Native SDK itself has no fee.

Does LOW_LIVENESS_SCORE always decline a check?

In the standalone passive liveness API, LOW_LIVENESS_SCORE is an error-severity warning, so the call comes back Declined when the score is at or below face_liveness_score_decline_threshold, which defaults to 30. It is not a soft signal you can ignore. Raise or lower the threshold on the workflow if your risk appetite differs.

Can I use the Didit React Native SDK with Expo?

The package ships an Expo config plugin, and the Didit documentation states that a development build is required. Install it with npm install @didit-protocol/sdk-react-native and rebuild the native project. If your app is on the bare React Native CLI, the same package installs the same way.

What does the liveness result look like in the API response?

A session returns liveness_checks[] on the decision payload, one entry per liveness node, each with a status of Not Started, In Progress, Approved, In Review, Declined, Abandoned or Kyc Expired. The standalone passive liveness endpoint returns liveness.status, liveness.method, liveness.score from 0 to 100, warnings, face_quality and face_luminance. The full schema is documented at /reference/data-models#liveness-check.

What happens when someone tries a spoof or a deepfake?

The check comes back Declined with an error-severity warning code. LIVENESS_FACE_ATTACK means the model detected a presentation attack, and LOW_LIVENESS_SCORE means the score fell at or below your decline threshold, which defaults to 30 in the standalone API. Neither should ever be approved. Blocklist matches come back as FACE_IN_BLOCKLIST or POSSIBLE_FACE_IN_BLOCKLIST and also decline, while duplicate and multiple-face signals do not decline on their own.

Do I need a backend to use the React Native SDK?

Yes. Session creation is authenticated with x-api-key, and that key cannot be shipped in a mobile app. Your backend creates the session and passes only the session token to the app; the app opens the verification UI with that token. Your backend then receives the decision by webhook or by polling the decision endpoint.

Should I use the native SDK or a WebView in React Native?

Didit's documentation recommends native SDKs over WebView integration. The React Native package wraps the native iOS and Android SDKs, which handle camera permissions, NFC reading and liveness capture on the device. A WebView integration loses NFC, camera optimization and biometric integration.

How do I test liveness without spending credits?

Use a sandbox API key. Sandbox keys skip processing and billing: the standalone passive liveness endpoint still validates the request and returns a static Approved mock payload, without persisting a session or consuming credits. Sandbox testing is free and unlimited on every plan, so run the full flow and the retry paths before you switch to live keys.

Which liveness method should I choose for my app?

ACTIVE_3D is the highest security option and suits banking, healthcare and government flows. FLASHING is high security and suits financial services and account access. PASSIVE is the standard option with the least user effort, suited to lower-risk flows. Because the method is set per workflow, you can run different methods for different products on the same account, and the method sets the price line: $0.15 for Active Liveness, $0.10 for passive.

Does the same React Native code work on iOS and Android?

Yes, the package is a cross-platform TypeScript API that wraps both native SDKs. The minimums are React Native 0.76 or later on the New Architecture, iOS 13.0 or later and Android API 24 or later. NFC reading is the one platform difference worth planning for: it needs iOS 15.0 or later.

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.