Skip to main content

KYC in React Native with the Didit SDK: 2026 integration guide

Create a Didit session on your server, open it with the React Native SDK 4.15.4 on RN 0.76+, then read the decision from the status.updated webhook or the decision endpoint. A full KYC check costs $0.33.

KYC in React Native with the Didit SDK: 2026 integration guide

Contents

In this guide

Jump to the part you need.

React Native apps fit Didit's native SDK, @didit-protocol/sdk-react-native 4.15.4: it opens the iOS and Android verification screens, including NFC passport reading, and Didit recommends it over a WebView integration. A full KYC check costs $0.33 and the SDK itself is free. Your app must use React Native 0.76+ with the New Architecture, on iOS 13.0+ or Android API 24+.

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

Didit React Native SDK: the numbers that decide the integration
ItemValueSource
Package@didit-protocol/sdk-react-native on npm and yarnNative SDK overview
Current version4.15.4, pinning native 4.15.4Native SDK overview
Minimum setupReact Native 0.76+ (New Architecture), iOS 13.0+, Android API 24+Native SDK overview
NFC passport and eID readingYes, $0.15 per check as an add-on to the document check, iOS 15+Price feed
Full KYC check$0.33: ID $0.15, passive liveness $0.10, face match $0.05, device and IP $0.03Price feed
Free plan credit$10.00 a month for eligible work emails, about 30 full checksPrice feed
SandboxFree and unlimited on every planPrice feed
SDK, Workflow Orchestrator, MCP serverFreePrice feed

Start free in the sandbox at business.didit.me, no sales call. If a coding agent is writing the app, connect it to Didit through the MCP server. Every unit price is on the pricing page, and the native SDK overview carries the version table for iOS, Android, React Native, Flutter and web.

What you are wiring together

Three pieces, in the order the docs describe them. Your server creates a verification session with your API key (POST https://verification.didit.me/v3/session/). The app hands that session to the SDK, which shows the native capture screens. Didit then decides: you read the decision from GET /v3/session/{session_id}/decision/, or you receive it on a webhook as status.updated.

Keep the API key on the server. The SDK is the screen; the session is the unit of work and the unit of billing. React Native 4.15.4 pins native 4.15.4, so the wrapper and the native screens move together and the package introduces no JavaScript API of its own. Didit runs 4,000+ companies in production across 220+ countries.

The Didit document scanning screen framing an ID document for capture
The SDK's document capture screen. Capture, NFC and liveness run on the device through the native SDK.

Prerequisites

  • A Didit organization. The sandbox is free and unlimited, and the Free plan adds $10 of credit a month for eligible work emails.
  • A KYC workflow. The workflow_id you send is the stable UUID from /v3/workflows/, and it decides which steps run for every session.
  • React Native 0.76+ with the New Architecture, iOS 13.0+, Android API 24+. NFC reading needs iOS 15+ or an Android device with NFC.
  • npm or yarn.
  • An HTTPS endpoint for webhooks. An http or https callback must sit on one of your application's allowed domains; custom URL schemes such as myapp:// are always accepted.
  • A device with a camera, plus the sandbox test data page open: it lists scenarios, magic values and sample documents so outcomes are deterministic.

Steps

  1. Get sandbox credentials and a workflow

    Sign up at business.didit.me. Sandbox sessions carry no PII and are not billed. Create a KYC workflow in the console and copy its workflow_id. Put the API key and the webhook signing secret in server-side environment variables.

  2. Create the session on your server

    The create-session endpoint takes workflow_id (required UUID), vendor_data (your stable identifier for the user, strongly recommended because it binds the session to an entity and drives duplicate detection), callback, language and optional expected_details.

    curl -X POST https://verification.didit.me/v3/session/ \
      -H "x-api-key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "workflow_id": "YOUR_WORKFLOW_UUID",
        "vendor_data": "user_12345",
        "callback": "myapp://verification",
        "language": "en",
        "expected_details": { "first_name": "Ana", "last_name": "Ruiz", "id_country": "ESP" }
      }'

    The response carries session_id and session_url. Send the session reference to the app. Do not ship the API key inside the bundle.

  3. Install the SDK

    npm install @didit-protocol/sdk-react-native
    # or
    yarn add @didit-protocol/sdk-react-native

    The React Native package pins the native version. 4.15.4 pins native 4.15.4 and adds no JavaScript API of its own, so the wrapper and the native screens always move together.

  4. Open the verification screen from the app

    Call the SDK from the app once your server has returned the session. The SDK exposes startVerification and startVerificationWithWorkflow. The React Native SDK guide lists the exact signature, the required options and the return value for 4.15.4, so copy the call from that page rather than from a paraphrase of it.

    On Android, React Native 4.15.3 fixes startVerification and startVerificationWithWorkflow when the app is backgrounded. The call waits for foreground and always settles.

  5. Receive the decision on a webhook

    Verify first, act second. Read the raw body without parsing it and reject anything whose X-Timestamp is more than 300 seconds away from now. X-Signature is HMAC-SHA256 over the exact raw bytes, so check it before any JSON parsing. X-Signature-V2 is the recommended header and is computed over the sorted, Unicode-preserving canonical JSON of the event, so that path reads the raw body, parses it only to canonicalize it, and verifies before you act on any field. Compare in constant time either way.

    import crypto from "node:crypto";
    
    // rawBodyBuffer: the untouched request body Buffer, read before any JSON parsing.
    // headers: the request headers, names lowercased.
    export function verifyDiditWebhook(rawBodyBuffer, headers, secret) {
      const timestamp = Number(headers["x-timestamp"]);
      if (!Number.isFinite(timestamp)) return null;
      if (Math.abs(Date.now() / 1000 - timestamp) > 300) return null;
    
      // Raw-byte check first: this runs before any JSON parsing.
      // Accept the current header or, for 24 hours after a rotation, its -Previous header.
      const rawReceived = headers["x-signature"];
      const rawPrevious = headers["x-signature-previous"];
      if (rawReceived || rawPrevious) {
        // X-Signature covers the exact received bytes, so hash the Buffer as it arrived.
        const rawExpected = crypto.createHmac("sha256", secret).update(rawBodyBuffer).digest("hex");
        if (!matches(rawExpected, rawReceived) && !matches(rawExpected, rawPrevious)) return null;
        return JSON.parse(rawBodyBuffer.toString("utf8"));
      }
    
      // X-Signature-V2: HMAC over the sorted canonical JSON, checked against the
      // current header and, for 24 hours after a rotation, its -Previous header.
      const event = JSON.parse(rawBodyBuffer.toString("utf8"));
      const expected = crypto
        .createHmac("sha256", secret)
        .update(canonicalJson(event))
        .digest("hex");
    
      const received = headers["x-signature-v2"];
      const previous = headers["x-signature-v2-previous"];
      if (!matches(expected, received) && !matches(expected, previous)) return null;
    
      return event; // branch on event.webhook_type, key stored state on event.event_id
    }
    
    function matches(expected, received) {
      if (!received) return false;
      const a = Buffer.from(expected, "utf8");
      const b = Buffer.from(received, "utf8");
      if (a.length !== b.length) return false;
      return crypto.timingSafeEqual(a, b);
    }
    
    // Sorted keys, Unicode preserved, as the webhook page describes.
    function canonicalJson(value) {
      if (Array.isArray(value)) return "[" + value.map(canonicalJson).join(",") + "]";
      if (value !== null && typeof value === "object") {
        return "{" + Object.keys(value).sort()
          .map((k) => JSON.stringify(k) + ":" + canonicalJson(value[k]))
          .join(",") + "}";
      }
      return JSON.stringify(value);
    }

    Respond with 2xx as soon as the signature checks out and update your state idempotently, keyed on event_id. There is no wildcard: subscribe to every event family you want to receive. For 24 hours after a destination signing secret is rotated, Didit also sends the matching -Previous headers, so compare against both X-Signature-V2 and X-Signature-V2-Previous and accept a constant-time match on either while you deploy.

  6. Or fetch the decision yourself

    If the app returns to the foreground before the webhook lands, read the decision directly. The key needs the read:sessions privilege.

    curl https://verification.didit.me/v3/session/<SESSION_ID>/decision/ \
      -H "x-api-key: YOUR_API_KEY"
  7. Branch on the session kind and match the status exactly

    Always branch on session_kind (user or business) before reading anything else. Then compare status strings with strict equality, because they are case sensitive. The enum is Not Started, In Progress, Approved, Declined, In Review, Awaiting User, Resubmitted, Expired, Abandoned and Kyc Expired, with that single capital K. The status page lists every transition.

  8. Test the outcomes you care about before you ship

    Pass sandbox_scenario at create time, or arm a scenario afterwards with POST /v3/session/{session_id}/sandbox/arm/ while the session is still Not Started. That gives you a declined session, an AML hit and an In Review session without a real person or a real document, and sandbox work is not billed.

Expected output

A finished session returns a decision object. The top level looks like this. Feature arrays are always plural, a feature that did not run is absent or null, and the arrays here are trimmed to their keys:

{
  "session_id": "...",
  "session_kind": "user",
  "status": "Approved",
  "vendor_data": "user_12345",
  "id_verifications": [],
  "liveness_checks": [],
  "face_matches": [],
  "nfc_verifications": null
}

Approved means every check passed. Declined means at least one failed and the decision carries the warnings. In Review means automated checks raised warnings that a person has to settle. The response also carries decision_trace, where decided_by says manual, automatic or investigator.

A session's ID document result in the Didit Business Console
The same data your webhook receives, shown per feature on the session in the console.

Inputs and outputs

Fields you send and fields you read
FieldDirectionWhat it does
workflow_idinRequired UUID. A KYC workflow creates user sessions; a KYB workflow creates business sessions from the same endpoint.
vendor_datainYour stable identifier for the user. Binds the session to an entity and is used for duplicate detection across sessions.
callbackinWhere the hosted flow redirects. Didit appends ?verificationSessionId={session_id}&status={status}.
expected_detailsinName, date of birth, nationality and ID country. Mismatches surface as decision warnings.
user_stateinISO 3166-2 or a US state code. In Auto consent mode, Illinois, Texas or Colorado triggers an explicit biometric consent step before the first face capture.
session_expiration_timeinSeconds the link stays valid, 3600 to 2419200, overriding the workflow setting for this session only.
session_id, session_urloutThe session identifier and its hosted URL, returned by create.
statusoutOne of the ten status strings, matched exactly.
session_kindoutuser or business. Branch on it before reading feature data.
id_verifications, liveness_checks, face_matches, nfc_verificationsoutPer-feature results as plural arrays. nfc_skip_reason explains a chip read that did not run.
decision_traceoutHow the status was reached, including decided_by, automatic_status and warning counts.

Failure cases and recovery

Failures you will actually hit, and what to do about them
What you seeWhyRecovery
401 on create or decisionInvalid or missing API keyCheck the x-api-key header. Rotate the key in the console if it leaked.
403 with You do not have permission to perform this action.The key lacks read:sessionsGrant the privilege to that key before calling the decision endpoint.
404 with Not found.Session does not exist or belongs to another applicationCheck the session ID and that you are using the key of the same application.
400 on callbackThe callback origin is not on your allowed domainsAdd the origin, or use a custom scheme deep link such as myapp://, which is always accepted.
429Rate limitRead the X-RateLimit headers and Retry-After, then back off instead of retrying in a loop.
5xxServer sideThe API errors page marks which failures are safe to retry. Retry those with backoff.
startVerification never resolves after backgroundingReact Native SDK before 4.15.3 on AndroidUpgrade to 4.15.3 or later. The call waits for the app to return to the foreground and always settles.
biometric_consent.status is pending with reason BIOMETRIC_CONSENT_UNSUPPORTED_SDKNative layer below 4.10.0Upgrade the package. Above that version the consent step is shown before the first face capture.
NFC step skippednfc_skip_reason is USER_SKIPPED, DOCUMENT_WITHOUT_CHIP, CHIP_CERTIFICATE_UNAVAILABLE, DEVICE_WITHOUT_NFC, INTEGRATION_WITHOUT_NFC_ACCESS, MRZ_KEY_UNAVAILABLE or JPKI_UNAVAILABLERead the reason from the report and route the session to another document or to review. Do not treat a skip as a pass.
Expired or AbandonedThe user never opened the link, or started and did not finish in timeCreate a new session. Never reuse a session ID for a retry.
In ReviewWarnings that need a personA reviewer decides in the console, and the decision records decided_by: "manual".
A Didit session overview showing the status and its warnings
Warnings are what move a session from an automatic decision to In Review.

What is billed, and where manual review starts

Billing is per completed check from prepaid credit. The SDK, the Workflow Orchestrator, reusable KYC and the MCP server are free, so the integration work itself does not add a line to the bill.

Published unit prices for steps a React Native flow can run
StepPrice (USD)Unit
Full KYC check (ID, passive liveness, face match, device and IP)$0.33check
ID document verification alone$0.15check
Passive liveness$0.10check
Face match 1:1$0.05check
Device and IP analysis$0.03check
Active liveness$0.15check
NFC chip reading (add-on)$0.15check
AML screening$0.20check
Proof of address$0.20check
Phone verificationFrom $0.02 plus the carrier price for the country and channelcheck
Face search 1:N$0.05search

Read the $0.33 line carefully: it is ID document, passive liveness, face match and device and IP analysis. NFC chip reading is a separate $0.15 add-on to the document check and is not part of that bundle, so a session that reads a passport costs $0.33 + $0.15 = $0.48 at list price.

The review boundary is a status, not a timer. While a session is In Progress, no person is involved. When automated checks raise warnings, it moves to In Review and a reviewer in the console approves, declines or requests a resubmission. A hand edit shows up in status_override next to the automatic_status it replaced. Reviewers, and the PATCH /v3/session/{sessionId}/update-status/ endpoint, can also move an Approved, Declined, Resubmitted, Abandoned or Kyc Expired session to Approved, Declined or Resubmitted.

Worked cost example

5,000 completed KYC checks in a month, with NFC passport reading on 1,000 of them, at list price:

  • 5,000 x $0.33 = $1,650.00 for the KYC checks.
  • 1,000 x $0.15 = $150.00 for the NFC add-on.
  • Total: $1,650.00 + $150.00 = $1,800.00.

On the Free plan, the $10.00 monthly credit covers $10.00 / $0.33 = 30 full KYC checks. On Growth the Didit prices are 4% lower: 5,000 x $0.3168 = $1,584.00 and 1,000 x $0.144 = $144.00, so $1,728.00, against a $99.00 monthly fee that includes $115.00 of credit. On Scale they are 10% lower: 5,000 x $0.297 = $1,485.00 and 1,000 x $0.135 = $135.00, so $1,620.00, against a $299.00 monthly fee that includes $350.00 of credit.

Add AML screening at $0.20 per check if your workflow runs it: 5,000 x $0.20 = $1,000.00, which is the $0.53 KYC plus AML combination per session. A phone step is priced by country and channel, so read the phone price list instead of estimating.

Where AI runs in identity verification

The split matters for what you control. Capture and the on-device liveness work run inside the native SDK, which is why Didit recommends it over a WebView integration: the docs say the native SDKs handle camera permissions, NFC reading and liveness detection out of the box and give full access to device capabilities. Decisioning runs on Didit's side, with sub-2-second p99 inference on our published figures, 200+ real-time fraud signals per session, 14,000+ supported document types and document recognition across 130+ languages. The verification flow and the native SDKs ship in 54 languages.

Test the two halves separately: how the capture screens behave on a mid-range Android device, and what the decision returns for a document with a replayed screen. Both run on a sandbox scenario, without PII and without billing.

Sources

Next step: open a free sandbox account at business.didit.me, create a KYC workflow, and run one session end to end on a device. No sales call, and the sandbox does not bill.

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 KYC to a React Native app with Didit?

Create a session on your server with POST https://verification.didit.me/v3/session/ and your x-api-key, install @didit-protocol/sdk-react-native, then open that session from the app with startVerification or startVerificationWithWorkflow. Read the result from the status.updated webhook or from GET /v3/session/{session_id}/decision/. The SDK requires React Native 0.76+ with the New Architecture, iOS 13.0+ and Android API 24+.

What does a React Native KYC check cost on Didit?

$0.33 per completed full KYC check: ID document $0.15, passive liveness $0.10, face match $0.05 and device and IP analysis $0.03. NFC passport reading is a $0.15 add-on on top of the document check, AML screening is $0.20, and the SDK itself is free. The Free plan includes $10.00 of credit a month, which covers 30 full checks.

Does the Didit React Native SDK support NFC passport reading?

Yes. The SDK reads ePassports and eIDs over NFC on iOS 15+ and on Android devices with NFC, at $0.15 per check on top of the document check. When a read is skipped, the decision carries nfc_skip_reason with a value such as USER_SKIPPED, DOCUMENT_WITHOUT_CHIP or DEVICE_WITHOUT_NFC.

Why does Didit recommend the native SDK over a WebView?

Didit's docs recommend native SDKs because they handle camera permissions, NFC reading and liveness detection out of the box and give full access to device capabilities, which is what passport reading and liveness capture need. The React Native package 4.15.4 pins native 4.15.4, so the app runs the same native screens with no JavaScript API to maintain. If your stack cannot ship native modules, the web SDK @didit-protocol/sdk-web 0.4.0 runs the same hosted flow in a modern browser.

Which statuses can a Didit session return?

Ten exact strings: Not Started, In Progress, Approved, Declined, In Review, Awaiting User, Resubmitted, Expired, Abandoned and Kyc Expired. They are case sensitive, including the single capital K in Kyc Expired, so compare with strict equality in your app and in your webhook handler.

What happens when a verification goes to In Review?

Automated checks raised warnings that need a person. A reviewer opens the session in the Didit console and approves it, declines it or requests a resubmission, and the decision records decided_by: "manual". Nothing in that step happens on the device, so your app only sees the status change.

How do I test a declined verification without a real user?

Use the sandbox. Pass sandbox_scenario when you create the session, or arm a scenario afterwards with POST /v3/session/{session_id}/sandbox/arm/ while the session is still Not Started. Sandbox sessions carry no PII and are not billed.

Why did startVerification hang when the app went to the background?

That was fixed on Android in React Native SDK 4.15.3. From that version the call waits until the app is back in the foreground before opening the verification screen, and it always settles. Upgrade the package, which pins the matching native version.

Can an AI assistant set up Didit for me?

Yes. The hosted MCP server at mcp.didit.me/mcp exposes Didit tools to Claude, ChatGPT, Cursor, VS Code and other MCP clients with OAuth sign-in instead of an API key, and it is free. Setup per client is at didit.me/developers/mcp.

Is the React Native SDK free?

The SDK is free, as are the Workflow Orchestrator, reusable KYC and the MCP server. You pay per completed check from prepaid credit, so integration work and sandbox testing add nothing to the bill.

Where does AI run in identity verification?

Capture and liveness work run on the device inside the native SDK, while document analysis, face match, AML screening and the final decision run on Didit's side with sub-2-second p99 inference. Didit publishes 200+ real-time fraud signals per session and 14,000+ supported document types across 130+ languages.

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.