Native SDK: This is the recommended approach for Android apps. Native SDKs provide the best user experience, optimized camera handling, and full NFC support.
21+ (Android 5.0 Lollipop). ML auto-detection requires API 24+ (see below).
Kotlin
1.9+
Jetpack Compose
Included as a transitive dependency
Feature availability by API level: Document and face auto-detection use MediaPipe (API 24+). On API 21–23 devices the SDK falls back to manual capture with a timed shutter button. All other features work across the full API 21+ range.
The SDK requires the following permissions. These are declared in the SDK’s AndroidManifest.xml and will be merged automatically into your app’s manifest:
Permission
Source AAR
Description
Required
INTERNET
didit-sdk-core
Network access for API communication
Yes
ACCESS_NETWORK_STATE
didit-sdk-core
Detect network availability
Yes
CAMERA
didit-sdk-core
Document scanning and face verification
Yes
NFC
didit-sdk-nfc
Read NFC chips in passports/ID cards
Auto-merged from didit-sdk-nfc (transitive dependency of me.didit:didit-sdk)
The SDK declares android.hardware.camera and android.hardware.nfc as optional features (android:required="false"). This ensures your app can be installed on devices without a camera or NFC hardware — the SDK will gracefully handle missing hardware at runtime.
Method 2: Backend Session (Recommended for Production)
Your backend creates the session via the Create Verification Session API (POST /v3/session/) with full parameter support (contact_details, expected_details, metadata, callback, etc.), then passes the session_token to the SDK.
// Your backend creates a session and returns the tokenval sessionToken = yourBackend.createVerificationSession(userId = currentUser.id)// Pass the token to the SDKDiditSdk.startVerification( token = sessionToken) { result -> handleResult(result)}
This approach gives you full control over:
Associating sessions with your users (vendor_data)
Setting custom metadata
Configuring callbacks per session
Providing contact details and expected details for cross-validation
Show close (X) button on verification step screens
showExitConfirmation
Boolean
true
Show confirmation dialog when user attempts to exit
closeOnComplete
Boolean
false
Auto-dismiss verification UI when complete (Web SDK equivalent: closeModalOnComplete)
Options showCloseButton, showExitConfirmation, and closeOnComplete match the Web SDK’s DiditSdkConfiguration. Mobile-specific options languageLocale and fontFamily exist because the mobile SDK renders the full verification UI natively (unlike the Web SDK which delegates to the hosted frontend inside an iframe).
Theming & Colors: Colors, backgrounds, and intro screen settings are configured through your White Label settings in the Didit Console, not in the SDK configuration. This ensures consistent branding across all platforms.
For advanced session parameters (contact_details, expected_details, metadata, callback), use the Backend Session method. Your backend calls the Create Verification Session API with full parameters, then passes the session_token to the SDK.
The SDK includes its own consumer ProGuard rules. No additional configuration is needed.If you use R8 full mode, you may need to add this to your gradle.properties:
End-to-End Example (Backend Session → Android SDK → Result)
This pattern is the production-ready integration. Your backend creates the session, your Android app receives the session_token, and the SDK runs the flow.
3. Backend — receive the final decision via webhook
The SDK result is convenient for UI feedback, but the authoritative outcome arrives via webhook. See the Webhooks guide for HMAC verification.
app.post("/api/webhooks/didit", express.raw({ type: "application/json" }), (req, res) => { // 1. Verify the X-Signature header (see Webhooks docs) // 2. Parse the body const event = JSON.parse(req.body.toString()); if (event.webhook_type === "status.updated") { // event.session_id, event.status ("Approved" | "Declined" | "In Review" | ...) // Look up the user by session_id and update their verification state. } res.sendStatus(200);});