> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs & Integrations

> Integrate Didit KYC into web, mobile, and backend with SDKs for React, Vue, iOS, Android, Flutter, React Native, plus Zapier and WordPress plugins.

export const VideoEmbed = ({src, title = "Video", type = "iframe"}) => <div className={type === "iframe" ? "didit-video-embed" : "didit-video-embed didit-video-native"}>
    {type === "iframe" ? <iframe src={src} title={title} style={{
  width: "100%",
  height: "100%",
  border: 0,
  borderRadius: "12px"
}} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen /> : <video controls autoPlay muted loop playsInline src={src} title={title} style={{
  width: "100%",
  height: "auto",
  display: "block",
  borderRadius: "12px"
}} />}
  </div>;

export const AgentPromptAccordion = ({prompt, title = "AI Agent Integration Prompt"}) => {
  const [copied, setCopied] = React.useState(false);
  const handleCopy = e => {
    e.stopPropagation();
    if (!prompt) return;
    navigator.clipboard.writeText(prompt.trim()).then(() => {
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    });
  };
  const agents = ["Claude Code", "Codex", "Cursor", "Devin", "Windsurf", "GitHub Copilot"];
  return <div className="didit-agent-card">
      {}
      <div className="didit-agent-titlebar">
        <div className="didit-agent-dots" aria-hidden="true">
          <span className="didit-agent-dot didit-agent-dot-red"></span>
          <span className="didit-agent-dot didit-agent-dot-yellow"></span>
          <span className="didit-agent-dot didit-agent-dot-green"></span>
        </div>
        <span className="didit-agent-filename">{title}</span>
        <button type="button" className={`didit-agent-copy ${copied ? "didit-agent-copy-copied" : ""}`} onClick={handleCopy} title="Copy prompt to clipboard" aria-label={copied ? "Copied!" : "Copy prompt to clipboard"}>
          {copied ? <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
              </svg>
              <span>Copied</span>
            </> : <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <rect x="5" y="5" width="9" height="9" rx="1.5" stroke="currentColor" strokeWidth="1.5" />
                <path d="M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5" stroke="currentColor" strokeWidth="1.5" />
              </svg>
              <span>Copy</span>
            </>}
        </button>
      </div>

      {}
      <pre className="didit-agent-body"><code>{prompt.trim()}</code></pre>

      {}
      <div className="didit-agent-footer">
        <span className="didit-agent-footer-label">Paste into</span>
        <div className="didit-agent-chips">
          {agents.map(name => <span key={name} className="didit-agent-chip">{name}</span>)}
        </div>
      </div>
    </div>;
};

<AgentPromptAccordion
  prompt={`I want to integrate Didit identity verification into my application. Analyze my project and recommend the best integration approach.

## My Project Context
[Describe your stack: framework, language, web vs mobile, etc.]

## Two Integration Approaches

Didit offers two main integration approaches. Choose based on your use case:

### Approach 1: SDK Integration via Sessions (RECOMMENDED)
Best for: User-facing verification flows (KYC onboarding, age verification, identity checks).
How it works: Your backend creates a session, your frontend presents a verification UI using an SDK, the user completes verification, and your backend receives results via webhook.
Why recommended: Didit-hosted verification flows are A/B tested and optimized for the highest completion rates, fastest speed, and best security. The SDKs handle camera permissions, NFC, liveness detection, document capture, and all edge cases out of the box.

### Approach 2: Standalone API (Direct REST Calls)
Best for: Server-to-server operations, batch processing, custom verification pipelines, or when you want full control over the verification UI.
How it works: Your backend calls Didit APIs directly for individual checks (ID verification, AML screening, liveness, face matching, age estimation, phone/email verification, proof of address, etc.).
When to use: When you already have your own capture UI, when you're doing backend-only batch processing, or when you need to compose individual verification steps into a custom pipeline.
Docs: Each standalone API has its own documentation under [Standalone APIs](/standalone-apis/id-verification).

## SDK Availability — All SDKs Are Available

### For Web Apps
1. **JavaScript SDK** (@didit-protocol/sdk-web) — RECOMMENDED for web. Works with React, Vue, Angular, Next.js, Nuxt, Svelte, and vanilla JS. Modal and inline/embedded modes. Full TypeScript support. Install: npm install @didit-protocol/sdk-web
2. InContext Iframe — Embed verification in your page with <iframe>. Simplest setup, no npm needed. Good for quick prototypes.
3. Redirect — Redirect user to Didit-hosted page, they return via callback URL. Best for cross-device flows or when iframe camera access is problematic.
4. WordPress/WooCommerce Plugin — For WordPress sites. No-code setup.
5. Shopify Plugin — For Shopify stores. No-code setup.
6. Salesforce — Salesforce-side integration. See /integration/web-sdks/salesforce.

### For Mobile Apps (ALWAYS prefer native SDKs over WebView)
1. **iOS Native SDK** — RECOMMENDED for iOS. Swift/SwiftUI/UIKit. iOS 13.0+ (NFC requires iOS 15.0+). Best UX, NFC passport/ID reading, optimized camera, 53 languages. SPM: https://github.com/didit-protocol/sdk-ios. CocoaPods: pod 'DiditSDK'
2. **Android Native SDK** — RECOMMENDED for Android. Kotlin/Jetpack Compose. minSdk 21 (Android 5.0+); ML auto-detection on API 24+. Best UX, NFC, optimized camera, 53 languages. Maven: me.didit:didit-sdk (via https://raw.githubusercontent.com/didit-protocol/sdk-android/main/repository)
3. **React Native SDK** — RECOMMENDED for React Native. RN 0.76+ (New Architecture), iOS 13.0+ / Android API 24+. Cross-platform TypeScript API wrapping native iOS and Android SDKs. NFC support, Expo config plugin (development build required). Install: npm install @didit-protocol/sdk-react-native
4. **Flutter SDK** — RECOMMENDED for Flutter. Flutter 3.3+, Dart 3.11+, iOS 13.0+ / Android API 23+. Cross-platform Dart API wrapping native iOS and Android SDKs. NFC support. pub.dev: didit_sdk
5. WebView (FALLBACK ONLY) — Only use if no native SDK is available for your platform. Loses NFC, camera optimization, and biometric integration.

### For Backend/Server
1. REST API — Server-to-server. Create sessions, retrieve results, manage users, call standalone APIs.
2. Webhooks — Receive real-time verification results asynchronously.
3. Zapier — No-code automation for verification workflows.

## SDK Session Integration Architecture (Recommended Flow)

### Step 1: Backend creates a session
POST https://verification.didit.me/v3/session/
Headers: { "x-api-key": DIDIT_API_KEY, "Content-Type": "application/json" }
Body: {
"workflow_id": DIDIT_WORKFLOW_ID,
"callback": "https://myapp.com/done",
"vendor_data": "internal-user-id"
}
Response: {
"session_id": "uuid",
"session_token": "jwt",
"verification_url": "https://verify.didit.me/...",
"status": "Not Started"
}

### Step 2: Present verification to user (choose one)
- Web JS SDK: DiditSdk.shared.startVerification({ url: verification_url })
- Iframe: embed verification_url in <iframe>
- Redirect: window.location.href = verification_url
- iOS/Android/RN/Flutter native SDK: DiditSdk.startVerification(token: session_token)

### Step 3: Receive results via webhook
Your backend receives POST with:
{
"session_id": "uuid",
"status": "Approved" | "Declined" | "In Review" | "In Progress" | "Abandoned",
"vendor_data": "internal-user-id",
"decision": { ... }
}
Verify the webhook signature (HMAC-SHA256, lowercase hex). Pick one header:
- X-Signature-V2 = HMAC(WEBHOOK_SECRET, canonical_json) — recommended; canonical_json is the body re-serialized with sorted keys, compact separators, and unescaped Unicode (survives middleware re-encoding).
- X-Signature = HMAC(WEBHOOK_SECRET, raw_body) — simplest, but only if you read the exact raw bytes before any parser touches them.
Also reject if abs(now - X-Timestamp) > 300 and use a constant-time compare. Full scheme: /integration/webhooks

### Step 4: Update your database
- "Approved" → user.verified = true, store decision data
- "Declined" → user.verification_status = "declined", log warnings
- "In Review" → user.verification_status = "pending_review"
- "Abandoned" → send reminder to user
- "Expired" → create new session

## Decision Data Model (from webhook or GET /v3/session/{id}/decision/)
Every per-feature result is a PLURAL ARRAY (one entry per workflow node). Never code against a singular key like \`nfc\` or \`id_verification\`.
{
"session_id": "uuid",
"session_kind": "KYC",
"status": "Approved",
"id_verifications":    [{ "node_id": "feature_ocr", "status": "Approved", "first_name": "John", "last_name": "Doe", "document_type": "Passport" }],
"nfc_verifications":   [{ "node_id": "feature_nfc", "status": "Approved" }],
"liveness_checks":     [{ "node_id": "feature_liveness", "status": "Approved", "score": 0.99, "method": "passive" }],
"face_matches":        [{ "node_id": "feature_face_match", "status": "Approved", "score": 95 }],
"aml_screenings":      [{ "node_id": "feature_aml", "status": "Approved", "total_hits": 0, "hits": [] }],
"phone_verifications": [{ "node_id": "feature_phone", "status": "Approved", "full_number": "+14155552671", "is_disposable": false }],
"email_verifications": [{ "node_id": "feature_email", "status": "Approved", "email": "alex.sample@example.com", "is_breached": false }],
"ip_analyses":         [{ "node_id": "feature_ip",    "status": "Approved" }]
}

## Choosing the Right Approach

| Question | → Use SDK Sessions | → Use Standalone API |
|----------|-------------------|---------------------|
| User-facing verification? | ✅ Yes | For custom capture UI only |
| Need highest completion rate? | ✅ Yes (A/B tested flows) | You manage UX yourself |
| Need NFC passport reading? | ✅ Yes (native SDKs) | Not available |
| Batch/backend processing? | Not ideal | ✅ Yes |
| Custom verification pipeline? | Limited to workflows | ✅ Full flexibility |
| Fastest integration? | ✅ Minutes with UniLink | Requires more setup |

## Rate Limits
- POST /v3/session/: 600 session creations per minute per application (scope: session-v2-create). Applies to every application — there is no separate free-tier limit on V3 today.
- GET endpoints: 300 requests per minute per application (generic-get).
- Write endpoints (POST/PATCH/DELETE): 300 per minute per application (generic-write).
- 429 responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (epoch seconds), and Retry-After. See /integration/rate-limiting.

## Environment Variables Needed
- DIDIT_API_KEY — from Didit Console > API & Webhooks
- DIDIT_WEBHOOK_SECRET — from Didit Console > API & Webhooks
- DIDIT_WORKFLOW_ID — from Didit Console > Workflows

## AI Agent Skills (for Cursor, Claude Code, etc.)
Install pre-built skills: npx clawhub@latest install didit-sessions
GitHub: https://github.com/didit-protocol/skills

## Docs
- Quick Start: https://docs.didit.me/getting-started/quick-start
- API Full Flow: https://docs.didit.me/integration/api-full-flow
- Webhooks: https://docs.didit.me/integration/webhooks
- Standalone APIs: https://docs.didit.me/standalone-apis/
- API Reference: https://docs.didit.me/api-reference/overview

Based on my project, please:
1. Recommend the best integration approach (SDK sessions vs standalone API) and the best method for my platform
2. Create the backend endpoint to create sessions (or standalone API calls)
3. Create the frontend component/view to present verification (if SDK approach)
4. Create the webhook endpoint to receive results
5. Add database schema updates to track verification status`}
/>

Choose how you want to integrate Didit based on your platform and use case.

<Note>
  ### Recommended: SDK integration via sessions

  For user-facing verification (KYC onboarding, age verification, identity checks), we recommend **SDK integration through hosted sessions**. The verification flows are A/B tested and optimized for the highest completion rates, fastest speed, and best security. All SDKs — web, iOS, Android, React Native, and Flutter — are **available now**.

  For server-to-server operations (batch processing, custom pipelines), use the **standalone APIs** directly. See the [standalone API documentation](/standalone-apis/id-verification) for individual verification endpoints.
</Note>

<Warning>
  If you launch a Didit session from your own product, you are still responsible for the controller-side notice and consent layer. Before the user starts verification, disclose that Didit powers the workflow, link your own privacy notice, and collect explicit consent where required for document, selfie, liveness, or biometric capture. See [Security & compliance](/getting-started/security-compliance), [White Label](/console/white-label), and [Create Session](/sessions-api/create-session).
</Warning>

<VideoEmbed src="https://www.youtube.com/embed/h0i9Q0-izcw?start=3922&rel=0&playsinline=1" title="Technical Documentation & SDK Overview" />

***

## Web

Integrate verification into your web app with JavaScript, iframe, or redirect.

<CardGroup cols={3}>
  <Card title="Web SDKs" icon="globe" href="/integration/web-sdks/overview">
    JavaScript SDK, iframe embed, or redirect. React, Vue, Angular, vanilla JS.
  </Card>

  <Card title="JavaScript SDK" icon="code" href="/integration/web-sdks/javascript-sdk">
    Full programmatic control with event callbacks and TypeScript.
  </Card>

  <Card title="InContext Iframe" icon="square" href="/integration/web-sdks/incontext-iframe">
    Embed verification in your page. No backend required with UniLink.
  </Card>

  <Card title="Redirect" icon="arrow-right" href="/integration/web-sdks/web-redirect">
    Redirect to Didit-hosted flow. Cross-device support.
  </Card>
</CardGroup>

***

## Mobile

Native SDKs for the best camera, NFC, and liveness experience on device.

<CardGroup cols={3}>
  <Card title="Native SDKs" icon="mobile" href="/integration/native-sdks/overview">
    iOS, Android, React Native, Flutter. Full NFC and biometric support.
  </Card>

  <Card title="iOS SDK" icon="apple" href="/integration/native-sdks/ios-sdk">
    SwiftUI and UIKit. NFC passport reading. Available now.
  </Card>

  <Card title="Android SDK" icon="android" href="/integration/native-sdks/android-sdk">
    Kotlin and Jetpack Compose. NFC support. Available now.
  </Card>

  <Card title="React Native" icon="react" href="/integration/native-sdks/react-native-sdk">
    Cross-platform TypeScript API wrapping native iOS and Android SDKs. NFC support. Available now.
  </Card>

  <Card title="Flutter" icon="feather" href="/integration/native-sdks/flutter-sdk">
    Cross-platform Dart API wrapping native iOS and Android SDKs. NFC support. Available now.
  </Card>

  <Card title="WebView Fallback" icon="tablet" href="/integration/web-sdks/webview-in-ios-android">
    Fallback for platforms without a native SDK. Prefer native SDKs when available.
  </Card>
</CardGroup>

***

## Integrations

Plugins and no-code tools for popular platforms.

<CardGroup cols={2}>
  <Card title="Zapier" icon="bolt" href="/integration/engines/zapier">
    Automate verification with no-code triggers and actions.
  </Card>

  <Card title="WordPress & WooCommerce" icon="plug" href="/integration/web-sdks/wordpress-woocommerce">
    Plugin for WordPress and WooCommerce sites.
  </Card>

  <Card title="Shopify" icon="bag-shopping" href="/integration/web-sdks/shopify">
    Verify shoppers and gate age-restricted products on Shopify.
  </Card>

  <Card title="Salesforce" icon="cloud" href="/integration/web-sdks/salesforce">
    Trigger Didit verifications from Salesforce flows and records.
  </Card>
</CardGroup>

***

## Quick Comparison

| Platform     | Method           | Status      | NFC | Camera    | Best For                            |
| ------------ | ---------------- | ----------- | :-: | --------- | ----------------------------------- |
| Web          | JavaScript SDK   | ✅ Available |  —  | Browser   | Full control, React / Vue / Angular |
| Web          | InContext Iframe | ✅ Available |  —  | Browser   | Quick embed, no backend needed      |
| Web          | Redirect         | ✅ Available |  —  | Browser   | Cross-device, simple setup          |
| iOS          | Native SDK       | ✅ Available |  ✅  | Optimized | Best UX, NFC chip reading           |
| Android      | Native SDK       | ✅ Available |  ✅  | Optimized | Best UX, NFC chip reading           |
| React Native | Native SDK       | ✅ Available |  ✅  | Optimized | Best UX, NFC chip reading           |
| Flutter      | Native SDK       | ✅ Available |  ✅  | Optimized | Best UX, NFC chip reading           |
| No-Code      | Zapier           | ✅ Available |  —  | —         | Automated workflows                 |
| CMS          | WordPress        | ✅ Available |  —  | —         | WP / WooCommerce sites              |
| Commerce     | Shopify          | ✅ Available |  —  | —         | Shopify stores                      |
| CRM          | Salesforce       | ✅ Available |  —  | —         | Salesforce flows and records        |

## Next Steps

<CardGroup cols={2}>
  <Card title="API Full Flow" icon="diagram-project" href="/integration/api-full-flow">
    End-to-end session integration: create sessions, webhooks, results.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/integration/webhooks">
    Receive real-time verification status updates.
  </Card>
</CardGroup>

***
