### Complete Flutter Example with Didit SDK Source: https://docs.didit.me/integration/native-sdks/flutter-sdk This example demonstrates a full Flutter application screen for initiating and handling Didit SDK verifications. It includes UI elements for token input, a button to start verification, and logic to display success, cancellation, or failure messages. Ensure you have the `didit_sdk` package added to your `pubspec.yaml`. ```dart import 'package:flutter/material.dart'; import 'package:didit_sdk/sdk_flutter.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Didit SDK Example', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xFF1A1A1A)), useMaterial3: true, ), home: const VerificationScreen(), ); } } class VerificationScreen extends StatefulWidget { const VerificationScreen({super.key}); @override State createState() => _VerificationScreenState(); } class _VerificationScreenState extends State { final _tokenController = TextEditingController(); bool _loading = false; @override void dispose() { _tokenController.dispose(); super.dispose(); } Future _startVerification() async { final token = _tokenController.text.trim(); if (token.isEmpty) { _showAlert('Error', 'Please enter a session token.'); return; } setState(() => _loading = true); try { final result = await DiditSdk.startVerification( token, config: const DiditConfig(loggingEnabled: true), ); switch (result) { case VerificationCompleted(:final session): _showAlert( 'Verification Complete', 'Status: ${session.status.name}\nSession: ${session.sessionId}', ); case VerificationCancelled(): _showAlert('Cancelled', 'The user cancelled the verification.'); case VerificationFailed(:final error): _showAlert('Failed', '${error.type.name}: ${error.message}'); } } catch (e) { _showAlert('Error', 'Unexpected error: $e'); } finally { setState(() => _loading = false); } } void _showAlert(String title, String message) { showDialog( context: context, builder: (ctx) => AlertDialog( title: Text(title), content: Text(message), actions: [ TextButton( onPressed: () => Navigator.pop(ctx), child: const Text('OK'), ), ], ), ); } @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Padding( padding: const EdgeInsets.all(24), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ TextField( controller: _tokenController, decoration: InputDecoration( hintText: 'Enter session token...', border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), ), autocorrect: false, ), const SizedBox(height: 16), ElevatedButton( onPressed: _loading ? null : _startVerification, style: ElevatedButton.styleFrom( backgroundColor: const Color(0xFF1A1A1A), foregroundColor: Colors.white, padding: const EdgeInsets.symmetric(vertical: 16), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), ), child: _loading ? const SizedBox( height: 20, width: 20, child: CircularProgressIndicator( strokeWidth: 2, color: Colors.white, ), ) : const Text( 'Start Verification', style: TextStyle(fontWeight: FontWeight.w600), ), ), ], ), ), ), ); } } ``` -------------------------------- ### Start Verification UI and Handle SDK State Source: https://docs.didit.me/integration/native-sdks/android-sdk Observe the SDK state to launch the verification UI when it's ready. Log errors if the SDK enters an error state. This setup should be in your main Activity. ```kotlin import me.didit.sdk.DiditSdk import me.didit.sdk.DiditSdkState import me.didit.sdk.VerificationResult class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // Observe SDK state to launch UI when ready lifecycleScope.launch { DiditSdk.state.collect { state -> when (state) { is DiditSdkState.Ready -> DiditSdk.launchVerificationUI(this@MainActivity) is DiditSdkState.Error -> Log.e("Didit", "Error: ${state.message}") else -> { /* Loading, Idle, CreatingSession */ } } } } } private fun startVerification() { // Method 1: UniLink (no backend required) DiditSdk.startVerification( workflowId = "your-workflow-id", vendorData = "user-123" ) { result -> handleResult(result) } // Method 2: Backend Session (recommended for production) // DiditSdk.startVerification( // token = "your-session-token" // ) { result -> // handleResult(result) // } } private fun handleResult(result: VerificationResult) { when (result) { is VerificationResult.Completed -> { Log.d("Didit", "Session: ${result.session.sessionId}") Log.d("Didit", "Status: ${result.session.status.rawValue}") } is VerificationResult.Cancelled -> { Log.d("Didit", "User cancelled") } is VerificationResult.Failed -> { Log.e("Didit", "Failed: ${result.error.message}") } } } } ``` -------------------------------- ### Install Didit.me SDK Source: https://docs.didit.me/integration/integration-prompt Choose the correct SDK installation command based on your technology stack. ```APIDOC ## Install the SDK | Stack | |---|---| | Web (React, Vue, Next.js, Nuxt, Svelte, vanilla JS) | `npm install @didit-protocol/sdk-web` | | iOS (Swift / SwiftUI) | SPM: `https://github.com/didit-protocol/didit-sdk-ios` | | Android (Kotlin / Jetpack Compose) | Maven | | React Native (Expo or bare) | `npm install @didit-protocol/sdk-react-native` | | Flutter | `flutter pub add didit_sdk` | | Backend-only / batch / custom UI | none — call REST directly | ``` -------------------------------- ### Start and Get KYB Verification Decision (Node.js) Source: https://docs.didit.me/business-verification/quickstart Use this Node.js example to initiate a KYB verification session and later retrieve the verification decision. Ensure your DIDIT_API_KEY and DIDIT_KYB_WORKFLOW_ID environment variables are set. ```typescript import fetch from 'node-fetch'; const API_KEY = process.env.DIDIT_API_KEY!; const WORKFLOW_ID = process.env.DIDIT_KYB_WORKFLOW_ID!; const BASE_URL = 'https://verification.didit.me'; async function startKybVerification(vendorData: string) { const res = await fetch(`${BASE_URL}/v3/session/`, { method: 'POST', headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ workflow_id: WORKFLOW_ID, vendor_data: vendorData }), }); if (!res.ok) throw new Error(`Session create failed: ${res.status}`); return res.json(); } async function getDecision(sessionId: string) { const res = await fetch(`${BASE_URL}/v3/session/${sessionId}/decision/`, { headers: { 'x-api-key': API_KEY }, }); return res.json(); } // Kick off the flow const { session_id, url } = await startKybVerification('biz-acme-001'); console.log('Deliver this URL to your contact:', url); // ... later, after the webhook confirms completion: const decision = await getDecision(session_id); console.log('KYB status:', decision.status); ``` -------------------------------- ### Start a Verification Session (Hosted) Source: https://docs.didit.me/getting-started/quick-start Initiate a verification session using the hosted sessions method, which is recommended for its optimization and security features. This example shows how to create a session programmatically using cURL. ```APIDOC ## POST /v3/session/ ### Description Initiates a new verification session. This is the recommended method for integrating hosted verification flows. ### Method POST ### Endpoint https://verification.didit.me/v3/session/ ### Parameters #### Request Body - **workflow_id** (string) - Required - The ID of the workflow to use for the session. ### Request Example ```bash 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-id"}' ``` ### Response #### Success Response (200) (Response details not provided in source) #### Response Example (Response example not provided in source) ``` -------------------------------- ### Install iOS Dependencies Source: https://docs.didit.me/integration/native-sdks/react-native-sdk After modifying the Podfile, run this command to install the necessary iOS dependencies for the Didit SDK. ```bash cd ios bundle exec pod install ``` -------------------------------- ### Create Verification Session and Start Source: https://docs.didit.me/integration/native-sdks/flutter-sdk Backend creates a session token, which is then passed to the SDK to start the verification. Recommended for production environments. ```dart import 'package:didit_sdk/sdk_flutter.dart'; // Your backend creates a session and returns the token final sessionToken = await yourBackend.createVerificationSession(userId); // Pass the token to the SDK final result = await DiditSdk.startVerification(sessionToken); ``` -------------------------------- ### Install Didit SDK for Web Source: https://docs.didit.me/integration/integration-prompt Use this command to install the Didit SDK for web-based applications like React, Vue, Next.js, and others. ```bash npm install @didit-protocol/sdk-web ``` -------------------------------- ### Complete Android SDK Integration Example Source: https://docs.didit.me/integration/native-sdks/android-sdk This example demonstrates how to initialize the SDK, observe its state to launch the verification UI, and handle the results of the verification process. It includes configuration options and different verification methods. ```kotlin import android.os.Bundle import android.util.Log import androidx.activity.ComponentActivity import androidx.lifecycle.lifecycleScope import kotlinx.coroutines.launch import me.didit.sdk.Configuration import me.didit.sdk.DiditSdk import me.didit.sdk.DiditSdkState import me.didit.sdk.VerificationResult import me.didit.sdk.VerificationStatus import me.didit.sdk.core.localization.SupportedLanguage class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // Observe SDK state lifecycleScope.launch { DiditSdk.state.collect { state -> when (state) { is DiditSdkState.Ready -> DiditSdk.launchVerificationUI(this@MainActivity) is DiditSdkState.Error -> Log.e("Didit", "Error: ${state.message}") else -> { /* Idle, Loading, CreatingSession */ } } } } } fun startVerification() { val config = Configuration( languageLocale = SupportedLanguage.ENGLISH, loggingEnabled = true ) // Method 1: UniLink (no backend required) DiditSdk.startVerification( workflowId = "your-workflow-id", vendorData = "user-123", configuration = config ) { result -> handleResult(result) } // Method 2: Backend Session (recommended for production) // DiditSdk.startVerification( // token = "your-session-token", // configuration = config // ) { result -> // handleResult(result) // } } private fun handleResult(result: VerificationResult) { when (result) { is VerificationResult.Completed -> { when (result.session.status) { VerificationStatus.APPROVED -> { Log.d("Didit", "Approved! Session: ${result.session.sessionId}") } VerificationStatus.PENDING -> { Log.d("Didit", "Under review") } VerificationStatus.DECLINED -> { Log.d("Didit", "Declined") } } } is VerificationResult.Cancelled -> { Log.d("Didit", "Cancelled: ${result.session?.sessionId ?: "unknown"}") } is VerificationResult.Failed -> { Log.e("Didit", "Error: ${result.error.message}") } } } } ``` -------------------------------- ### Decision Data Model Example Source: https://docs.didit.me/integration/sdks This is an example of the decision data model returned from a webhook or a GET /v3/session/{id}/decision/ request. It includes statuses for verifications, checks, and AML. ```json { "session_id": "uuid", "status": "Approved", "id_verifications": { "status": "Approved", "first_name": "John", "last_name": "Doe", "document_type": "Passport", ... }, "liveness_checks": { "status": "Approved", "score": 0.99, "method": "passive" }, "face_matches": { "status": "Approved", "score": 95 }, "aml": { "status": "Approved", "total_hits": 0, "hits": [] }, "phone": { "status": "Approved", "full_number": "+14155552671", "is_disposable": false }, "email": { "status": "Approved", "email": "alex.sample@example.com", "is_breached": false } } ``` -------------------------------- ### Create a Verification Session (Full Example) Source: https://docs.didit.me/integration/api-full-flow A comprehensive example of creating a verification session with all available options. This includes metadata, contact details for notifications, and expected user details for cross-validation. ```bash curl -X POST https://verification.didit.me/v3/session/ \ -H "Content-Type: application/json" \ -H "x-api-key: YOUR_API_KEY" \ -d '{ "workflow_id": "11111111-2222-3333-4444-555555555555", "callback": "https://yourapp.com/verification-complete", "vendor_data": "user-123", "metadata": { "plan": "premium", "signup_source": "mobile-app" }, "contact_details": { "email": "alex.sample@example.com", "email_lang": "en", "send_notification_emails": true, "phone": "+15550101000" }, "expected_details": { "first_name": "John", "last_name": "Doe", "date_of_birth": "1990-01-01", "expected_document_types": ["P", "ID"] } }' ``` -------------------------------- ### Complete React Native Verification App Example Source: https://docs.didit.me/integration/native-sdks/react-native-sdk This example shows a full React Native application component that includes a text input for a session token, a button to start verification, and UI feedback for loading and results. It utilizes `useState`, `useCallback`, and `Alert` for user interaction and feedback. ```tsx import { useState, useCallback } from 'react'; import { Text, View, TextInput, TouchableOpacity, Alert, ActivityIndicator, SafeAreaView, } from 'react-native'; import { startVerification, VerificationStatus, type VerificationResult, } from '@didit-protocol/sdk-react-native'; export default function App() { const [token, setToken] = useState(''); const [loading, setLoading] = useState(false); const handleVerify = useCallback(async () => { if (!token.trim()) { Alert.alert('Error', 'Please enter a session token.'); return; } setLoading(true); try { const result = await startVerification(token.trim(), { loggingEnabled: true, }); switch (result.type) { case 'completed': Alert.alert( 'Verification Complete', `Status: ${result.session.status}\nSession: ${result.session.sessionId}` ); break; case 'cancelled': Alert.alert('Cancelled', 'The user cancelled the verification.'); break; case 'failed': Alert.alert('Failed', `${result.error.type}: ${result.error.message}`); break; } } catch (error) { Alert.alert('Error', `Unexpected error: ${error}`); } finally { setLoading(false); } }, [token]); return ( {loading ? ( ) : ( Start Verification )} ); } ``` -------------------------------- ### Create Business with Basic Info Source: https://docs.didit.me/management-api/businesses/create Use this example to create a business profile with essential information. Ensure the `vendor_data` and `legal_name` are provided, along with the `country_code`. ```yaml POST /v3/businesses/create/ openapi: 3.0.0 info: version: 3.0.0 title: Didit Verification API description: Identity verification API. Authenticate with x-api-key header. servers: - url: https://verification.didit.me security: - ApiKeyAuth: [] tags: [] paths: /v3/businesses/create/: post: tags: - Businesses summary: Create Business description: >- Create a new business profile manually. Use this to pre-create business profiles before starting verification sessions, or to register businesses for transaction monitoring. operationId: create_business requestBody: required: true content: application/json: schema: type: object required: - vendor_data properties: vendor_data: type: string description: Your unique identifier for this business display_name: type: string nullable: true description: Custom display name for this business legal_name: type: string nullable: true description: Official legal name of the company registration_number: type: string nullable: true description: Company registration or incorporation number country_code: type: string nullable: true description: >- Country of incorporation (ISO 3166-1 alpha-2, e.g. `GB`, `US`). region: type: string nullable: true description: ISO 3166-2 subdivision code (e.g. `CA`, `NY` for US states). status: type: string enum: - Active - Flagged - Blocked description: Initial status (defaults to Active) metadata: type: object nullable: true description: Custom metadata JSON examples: Basic: summary: Create with basic info value: vendor_data: company-456 legal_name: New Corp Ltd country_code: US Full: summary: Create with all fields value: vendor_data: company-789 display_name: New Corp legal_name: New Corp International Ltd registration_number: '98765432' country_code: DE metadata: industry: fintech tier: enterprise responses: '201': description: Business created. content: application/json: schema: $ref: '#/components/schemas/BusinessDetailItem' security: - ApiKeyAuth: [] components: schemas: BusinessDetailItem: type: object description: >- Full business detail. Extends BusinessListItem with metadata and comments. allOf: - $ref: '#/components/schemas/BusinessListItem' - type: object properties: metadata: type: object nullable: true description: Custom metadata JSON you attached to this business comments: type: array items: type: object properties: uuid: type: string format: uuid comment_type: type: string comment: type: string nullable: true actor_email: type: string nullable: true actor_name: type: string nullable: true previous_status: type: string nullable: true new_status: type: string nullable: true created_at: type: string format: date-time description: Activity log and comments for this business updated_at: type: string format: date-time BusinessListItem: type: object description: A verified business. properties: didit_internal_id: type: string format: uuid description: Didit's stable internal UUID for this business. vendor_data: type: string nullable: true description: >- ``` -------------------------------- ### Pre-create User Entity and Run Session Source: https://docs.didit.me/entities/vendor-data-linking Use this to first create a user entity with initial metadata, then initiate a user verification session linked to that pre-created entity. ```bash # 1. Pre-create the User with initial metadata curl -X POST https://verification.didit.me/v3/users/create/ \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "vendor_data": "user-42", "display_name": "Jane Doe", "metadata": { "tier": "premium", "signup_date": "2026-04-01" } }' # 2. Create a User Verification (KYC) session for the same user curl -X POST https://verification.didit.me/v3/session/ \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workflow_id": "wf_kyc_standard", "vendor_data": "user-42" }' ``` -------------------------------- ### Start Verification with UniLink URL Source: https://docs.didit.me/integration/web-sdks/javascript-sdk Use this method for a simple integration where the UniLink URL is directly provided. No backend setup is required. The session ID is received via an event. ```typescript DiditSdk.shared.startVerification({ // You can get this link by clicking on "copy link" in the workflows view url: 'https://verify.didit.me/u/WORKFLOW_ID_IN_BASE_64' }); ``` -------------------------------- ### Initialize and Start Verification (Vanilla JS) Source: https://docs.didit.me/integration/web-sdks/javascript-sdk Initialize the SDK with a session token and event handlers. Then, start the verification process using a provided URL. Supports both modal (default) and inline modes. ```javascript import DiditSdk from '@didit-protocol/sdk-web'; DiditSdk.init({ session_token: 'token-from-backend', onSuccess: (session) => { console.log('Verification completed:', session.sessionId, session.status); // session.status: "Approved" | "Declined" | "In Review" }, onError: (error) => { console.error('SDK error:', error.code, error.message); }, onCancel: () => { console.log('User cancelled verification'); } }); // Modal mode (default) DiditSdk.startVerification({ url: 'verification-url-from-backend' }); // Inline mode (renders inside a container) DiditSdk.startVerification({ url: 'verification-url-from-backend', configuration: { mode: 'inline', containerId: 'didit-container' } }); ``` -------------------------------- ### List Users OpenAPI Specification Source: https://docs.didit.me/management-api/users/list This OpenAPI specification defines the GET /v3/users/ endpoint for listing verified users. It includes details on parameters, responses, and an example of the expected JSON output. ```yaml openapi: 3.0.0 info: version: 3.0.0 title: Didit Verification API description: Identity verification API. Authenticate with x-api-key header. servers: - url: https://verification.didit.me security: - ApiKeyAuth: [] tags: [] paths: /v3/users/: get: tags: - Users summary: List Users description: >- List all verified users for your application. Each user includes `didit_internal_id`, Didit's stable internal UUID, and may have `vendor_data` when you supplied your own identifier during session creation. Returns verification status and session history. operationId: list_users parameters: - name: status in: query schema: type: string enum: - Approved - Declined - In Review - Pending description: Filter by overall user status - name: search in: query schema: type: string description: Search by name, vendor_data, email, or phone number - name: country in: query schema: type: string description: Filter by issuing country (ISO3 code) - name: limit in: query schema: type: integer default: 50 description: Results per page (max 200) - name: offset in: query schema: type: integer default: 0 description: Pagination offset responses: '200': description: >- Paginated list of users with verification status, session counts, and feature breakdown. content: application/json: schema: type: object properties: count: type: integer description: Total number of users matching filters next: type: string nullable: true description: URL of next page previous: type: string nullable: true description: URL of previous page results: type: array items: $ref: '#/components/schemas/UserListItem' examples: Example: value: count: 2 next: null previous: null results: - didit_internal_id: f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418 vendor_data: user-abc-123 display_name: null full_name: John Michael Doe date_of_birth: '1990-05-15' effective_name: John Michael Doe status: Approved portrait_image_url: >- https://service-didit-verification.s3.amazonaws.com/... session_count: 3 approved_count: 2 declined_count: 0 in_review_count: 1 issuing_states: USA: 2 approved_emails: john@example.com: true approved_phones: '+14155551234': true features: OCR: Approved LIVENESS: Approved FACE_MATCH: Approved AML: Approved features_list: - feature: OCR status: Approved - feature: LIVENESS status: Approved - feature: FACE_MATCH status: Approved - feature: AML status: Approved last_session_at: '2025-06-15T10:30:00Z' first_session_at: '2025-06-01T08:00:00Z' tags: - uuid: t1111111-2222-3333-4444-555555555555 name: VIP color: '#2567FF' created_at: '2025-06-01T08:00:00Z' - didit_internal_id: 6ed99d53-e8f5-4cf8-9ac1-4a506cb40f6b vendor_data: null display_name: Jane S. full_name: Jane Elizabeth Smith date_of_birth: '1985-11-22' effective_name: Jane S. status: In Review portrait_image_url: null ``` -------------------------------- ### Initialize and Start Verification (Script Tag UMD) Source: https://docs.didit.me/integration/web-sdks/javascript-sdk Include the SDK via a script tag and access it through the global `DiditSDK` object. Define the `onComplete` callback and use a button click to trigger the verification process with a UniLink URL. ```html ``` -------------------------------- ### Initialize and Start Verification (ES Modules/TypeScript) Source: https://docs.didit.me/integration/web-sdks/javascript-sdk Set up the `onComplete` callback to handle different verification outcomes (completed, cancelled, failed). Then, use the `startVerification` method with a UniLink URL to initiate the process. ```typescript import { DiditSdk } from '@didit-protocol/sdk-web'; // Set up completion callback DiditSdk.shared.onComplete = (result) => { switch (result.type) { case 'completed': console.log('Verification completed!'); console.log('Session ID:', result.session?.sessionId); console.log('Status:', result.session?.status); break; case 'cancelled': console.log('User cancelled verification'); break; case 'failed': console.error('Verification failed:', result.error?.message); break; } }; // Start verification with URL (from your backend or UniLink) DiditSdk.shared.startVerification({ url: 'https://verify.didit.me/session/session-token' }); ``` -------------------------------- ### Install Didit MCP Server Configuration Source: https://docs.didit.me/integration/ai-agent-integration Add this JSON configuration to your MCP setup file (e.g., .cursor/mcp.json or claude_desktop_config.json) to integrate the Didit MCP server. Ensure you replace 'your_api_key_here' with your actual Didit API key. ```json { "mcpServers": { "didit": { "command": "npx", "args": ["@didit-protocol/mcp-server"], "env": { "DIDIT_API_KEY": "your_api_key_here" } } } } ``` -------------------------------- ### Initialize and Start Verification with Custom Configuration Source: https://docs.didit.me/integration/native-sdks/android-sdk Configure SDK behavior such as language, font, and logging before starting a verification session. Ensure you have a valid session token. ```kotlin import me.didit.sdk.Configuration import me.didit.sdk.core.localization.SupportedLanguage val configuration = Configuration( languageLocale = SupportedLanguage.SPANISH, // Force Spanish language fontFamily = "my_custom_font", // Custom font (must be in res/font/) loggingEnabled = true // Enable debug logging ) DiditSdk.startVerification( token = "your-session-token", configuration = configuration ) { handleResult(result) } ``` -------------------------------- ### OpenAPI Specification for Retrieve Session Decision Source: https://docs.didit.me/sessions-api/retrieve-session This OpenAPI specification defines the `GET /v3/session/{sessionId}/decision/` endpoint for retrieving verification session decisions. It includes parameters, request/response structures, and an example of a full response for a User Verification session. ```yaml openapi: 3.0.0 info: version: 3.0.0 title: Didit Verification API description: Identity verification API. Authenticate with x-api-key header. servers: - url: https://verification.didit.me security: - ApiKeyAuth: [] tags: [] paths: /v3/session/{sessionId}/decision/: get: summary: >- Retrieve a User Verification (KYC) or Business Verification (KYB) session decision description: >- Returns the full decision for a verification session. This endpoint accepts the `session_id` of either a **User Verification (KYC)** session or a **Business Verification (KYB)** session and dispatches automatically. The response includes a top-level `session_kind` field (`"user"` or `"business"`) and the feature arrays relevant to that kind. User-only arrays: `id_verifications`, `liveness_checks`, `face_matches`, `nfc_verifications`, `poa_verifications`, `database_validations`. Business-only arrays: `registry_checks`, `document_verifications`, `key_people_checks`. Shared arrays: `aml_screenings`, `phone_verifications`, `email_verifications`, `questionnaire_responses`, `ip_analyses`, `reviews`, `contact_details`. Permission: `read:sessions` covers both kinds. operationId: get_v2session{sessionId}decision parameters: - name: sessionId in: path required: true description: >- The unique identifier of the session for which to retrieve verification results. schema: type: string default: '' responses: '200': description: '' content: application/json: examples: Example: summary: Full Example value: session_id: 11111111-2222-3333-4444-555555555555 session_number: 43762 session_url: >- https://verify.didit.me/session/11111111-2222-3333-4444-555555555555 status: In Review workflow_id: 11111111-2222-3333-4444-555555555555 features: - ID_VERIFICATION - NFC - LIVENESS - FACE_MATCH - POA - PHONE - DATABASE_VALIDATION - AML - IP_ANALYSIS vendor_data: 11111111-1111-1111-1111-111111111111 metadata: user_type: premium account_id: ABC123 expected_details: first_name: Carmen last_name: Española Española contact_details: email: carmen@example.com email_lang: es send_notification_emails: false callback: https://verify.didit.me/ id_verifications: - node_id: feature_ocr_1 status: Approved document_type: Identity Card document_number: CAA000000 personal_number: 99999999R portrait_image: https://example.com/portrait.jpg front_image: https://example.com/front.jpg front_video: https://example.com/front.mp4 back_image: https://example.com/back.jpg back_video: https://example.com/back.mp4 full_front_image: https://example.com/full_front.jpg full_back_image: https://example.com/full_back.jpg front_image_camera_front: https://example.com/front_camera_front.jpg back_image_camera_front: https://example.com/back_camera_front.jpg date_of_birth: '1980-01-01' age: 45 expiration_date: '2031-06-02' date_of_issue: '2021-06-02' issuing_state: ESP issuing_state_name: Spain first_name: Carmen last_name: Española Española full_name: Carmen Española Española gender: F address: Avda de Madrid 34, Madrid, Madrid formatted_address: Avda de Madrid 34, Madrid, Madrid 28822, Spain place_of_birth: Madrid marital_status: Single nationality: ESP extra_fields: dl_categories: [] blood_group: null ``` -------------------------------- ### Install AI Agent Skills Source: https://docs.didit.me/integration/sdks Install pre-built AI agent skills for tools like Cursor and Claude Code using npx. This command installs the 'didit-sessions' skill. ```bash npx clawhub@latest install didit-sessions ``` -------------------------------- ### Install All Didit Skills via ClawHub Source: https://docs.didit.me/getting-started/agent-skills Use this command to install multiple Didit skills at once using the ClawHub package manager. If clawhub is not installed globally, use npx. ```bash clawhub install didit-sessions didit-id-verification didit-passive-liveness didit-face-match didit-aml-screening ``` ```bash npx clawhub@latest install didit-sessions didit-id-verification didit-passive-liveness didit-face-match didit-aml-screening ``` -------------------------------- ### List and Create Workflows Source: https://docs.didit.me/integration/integration-prompt These bash commands demonstrate how to list existing workflows and create a new one for KYC. The creation command specifies features like OCR, Liveness, Face Match, and IP Analysis, with optional configurations. ```bash # List existing workflows curl https://verification.didit.me/v3/workflows/ \ -H "x-api-key: $DIDIT_API_KEY" # Create a new KYC workflow — features are UPPERCASE enum values, each an object with optional `config` curl -X POST https://verification.didit.me/v3/workflows/ \ -H "x-api-key: $DIDIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workflow_label": "Standard KYC", "features": [ { "feature": "OCR" }, { "feature": "LIVENESS", "config": { "face_liveness_method": "PASSIVE" } }, { "feature": "FACE_MATCH" }, { "feature": "IP_ANALYSIS" } ] }' # Response.uuid — save as DIDIT_WORKFLOW_ID ``` -------------------------------- ### Transaction Webhook Payload Example Source: https://docs.didit.me/integration/webhooks Example of a webhook payload for transaction-related events. ```APIDOC ## Transaction webhook payloads Transaction monitoring events use the application-level webhook fan-out and include the transaction identifier in the payload: ```json { "event_id": "uuid", "webhook_type": "transaction.created", "timestamp": 1774970000, "created_at": 1774970000, "application_id": "uuid", "transaction_id": "uuid", "txn_id": "finance0001", "status": "APPROVED", "score": 0, "severity": "UNKNOWN", "amount": "1200.00", "currency": "EUR", "direction": "OUTBOUND" } ``` New transactions are recorded as `APPROVED` by default. If a matching rule or workflow explicitly changes the status during creation, the initial `transaction.created` payload reflects that final status. Use `transaction.created` when a transaction is first recorded, and `transaction.status.updated` whenever a rule, analyst action, remediation flow, or blocklist action changes the transaction status after creation. ``` -------------------------------- ### Workflow Feature Configuration Example Source: https://docs.didit.me/management-api/workflows/feature-configs Example of how to structure the `features` array with `config` for an OCR feature in a linear workflow. ```APIDOC ## POST /v3/workflows/ ### Description Creates a simple linear workflow using the provided features array. ### Method POST ### Endpoint /v3/workflows/ ### Request Body - **workflow_label** (string) - Required - A label for the workflow. - **features** (array) - Required - An ordered array of features to be included in the workflow. - **feature** (string) - Required - The type of feature (e.g., "OCR", "QUESTIONNAIRE"). - **config** (object) - Optional - Configuration specific to the feature. - **documents_allowed** (object) - Optional - Specifies allowed documents for OCR. Example: `{"USA": {"DL": {"enabled": 1}}}`. ### Request Example ```json { "workflow_label": "Standard KYC", "features": [ { "feature": "OCR", "config": { "documents_allowed": { "USA": { "DL": { "enabled": 1 } } } } } ] } ``` ## PATCH /v3/workflows/{settings_uuid}/ ### Description Updates an existing linear workflow configuration. ### Method PATCH ### Endpoint /v3/workflows/{settings_uuid}/ ### Parameters #### Path Parameters - **settings_uuid** (string) - Required - The UUID of the workflow settings to update. ### Request Body - **workflow_label** (string) - Optional - A label for the workflow. - **features** (array) - Optional - An ordered array of features to be included in the workflow. - **feature** (string) - Required - The type of feature (e.g., "OCR", "QUESTIONNAIRE"). - **config** (object) - Optional - Configuration specific to the feature. - **documents_allowed** (object) - Optional - Specifies allowed documents for OCR. Example: `{"USA": {"DL": {"enabled": 1}}}`. ### Request Example ```json { "workflow_label": "Updated KYC Workflow", "features": [ { "feature": "OCR", "config": { "documents_allowed": { "USA": { "DL": {"enabled": 1}, "ID": {"enabled": 1} } } } } ] } ``` ``` -------------------------------- ### Create Simple KYC Workflow Source: https://docs.didit.me/management-api/workflows/create Use this example to create a standard KYC workflow including OCR, Liveness, and Face Match features in sequence. Ensure the 'x-api-key' header is included for authentication. ```yaml POST /v3/workflows/ openapi: 3.0.0 info: version: 3.0.0 title: Didit Verification API description: Identity verification API. Authenticate with x-api-key header. servers: - url: https://verification.didit.me security: - ApiKeyAuth: [] tags: [] paths: /v3/workflows/: post: tags: - Workflows summary: Create Workflow description: >- Create a new simple workflow by sending the verification features in the order users should complete them. The API converts the `features` array into a linear node-based workflow internally. Branching, actions, and webhook nodes are not supported on this endpoint. operationId: create_workflow requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SimpleWorkflowRequest' examples: Simple KYC: summary: Linear ID, liveness, and face match workflow value: workflow_label: Standard KYC features: - feature: OCR config: duplicated_user_action: review - feature: LIVENESS config: face_liveness_method: passive - feature: FACE_MATCH config: face_match_score_decline_threshold: 40 face_match_score_review_threshold: 60 KYC + AML: summary: Run AML after ID verification value: workflow_label: KYC with AML features: - feature: OCR - feature: AML config: aml_score_review_threshold: 70 aml_score_approve_threshold: 30 Questionnaire workflow: summary: Run a questionnaire created with POST /v3/questionnaires/ value: workflow_label: Source of Funds features: - feature: QUESTIONNAIRE config: questionnaire_uuid: 11111111-2222-3333-4444-555555555555 review_questionnaire_manually: true responses: '201': description: Workflow created. content: application/json: schema: $ref: '#/components/schemas/WorkflowListItem' '400': description: Validation error (invalid configuration, conflicting settings, etc.) security: - ApiKeyAuth: [] components: schemas: SimpleWorkflowRequest: type: object description: >- Create a simple linear workflow. The API converts this feature list into a node-based workflow graph internally. required: - workflow_label - features properties: workflow_label: type: string description: Display name for the workflow. example: Standard KYC is_default: type: boolean description: Set this workflow as the default for new sessions. status: type: string enum: - draft - published description: >- Omit this field to create a published workflow ready for sessions. Use `draft` only when you want to save without publishing. features: type: array minItems: 1 description: >- Verification features in execution order. The API links each item to the next one and adds one final status node automatically. items: $ref: '#/components/schemas/SimpleWorkflowFeature' is_white_label_enabled: type: boolean description: >- Enable white-label customization for sessions created with this workflow. default: false is_desktop_allowed: type: boolean description: Allow the verification flow to run on desktop browsers. default: false max_retry_attempts: type: integer minimum: 0 maximum: 10 default: 3 description: >- Maximum retry attempts allowed after a declined verification. `0` blocks the user after the first decline. retry_window_days: type: integer minimum: 1 maximum: 365 nullable: true default: 7 description: >- Rolling window in days used to count retries. `null` enforces an all-time limit. session_expiration_time: type: integer minimum: 3600 maximum: 2419200 default: 604800 description: >- ```