docupass_flutter 0.1.1
docupass_flutter: ^0.1.1 copied to clipboard
Native in-app ID verification & KYC for Flutter (ID Analyzer DocuPass) — document scan, face match, on-device liveness, no WebView.
DocuPass Flutter SDK — Native In-App ID Verification, KYC & Liveness #
Add identity verification and KYC to your Flutter app — ID document scanning,
biometric face match, and active liveness — running natively on-device
with no external browser and no WebView. One DocuPassView widget, one
onResult callback.
This plugin embeds the native Android and iOS DocuPass SDKs as a platform view (CameraX / AVFoundation + Google MediaPipe liveness) — true native capture, not a wrapped web page.
Built by ID Analyzer — identity verification for 190+ countries and 14,000+ document types.
📚 Full documentation: developer.idanalyzer.com/help/docupass-flutter-sdk · 🌐 Product: DocuPass · 📦 Other platforms: Android · iOS · React Native
Features #
- 📱 True native capture — no WebView, no
getUserMediapermission issues. - 🧠 On-device active liveness (MediaPipe) + biometric face match.
- 🪪 Global documents — passports, driver licenses, ID cards, 190+ countries.
- ✍️ Full DocuPass flow: document capture, face match, custom forms, phone OTP, e-signature.
- 🎨 White-label —
brandColor,logoUrl, and fulllabelsoverrides (any language). - 🔒 Your API key never touches the device — only a short-lived
reference.
How it works #
Your API key is secret and lives only on your backend — the app never creates a
session or reads results directly. The device only ever holds a short-lived reference.
- Server → create a session.
POST /docupasswith your API key (any ID Analyzer server SDK) using a KYC profile; set a webhook URL on the profile. You get areference. - App → render
DocuPassView(reference: ...). The SDK runs capture + liveness on-device and callsonResultwhen the flow ends — a UX signal, not the result. - Server → receive the verified result:
- Recommended — webhook (push). On completion, ID Analyzer
POSTs the full transaction (name, DOB, document number, face-match, AML, decision, warnings, images) to your webhook URL, with retries. - Or pull it server-side with
GET /docupass/{reference}(your API key).
- Recommended — webhook (push). On completion, ID Analyzer
🔒 Never put your API key in the app, and never call
POST /docupassorGET /docupass/{reference}from the app — both need your secret key.onResultis a UI cue only; your backend is the source of truth.
Installation #
# pubspec.yaml
dependencies:
docupass_flutter: ^0.1.1
Then flutter pub get. Native dependencies resolve automatically:
- iOS (15+) — the
DocuPassCocoaPod (pulls inMediaPipeTasksVision). Add a camera usage string toios/Runner/Info.plist:<key>NSCameraUsageDescription</key> <string>Required to verify your identity.</string> - Android (minSdk 24) —
com.idanalyzer:docupass; theCAMERApermission is declared by the native core.
Usage #
Put DocuPassView on a full-screen route (it's a platform view that wants the space):
import 'package:docupass_flutter/docupass_flutter.dart';
DocuPassView(
reference: 'US...your-reference...', // create server-side via POST /docupass
onResult: (result) {
switch (result.status) {
case DocuPassStatus.completed:
// Flow finished — update your UI. Verified data arrives on your
// server via webhook (or GET /docupass/{result.reference}), not here.
break;
case DocuPassStatus.failed: break; // rejected
case DocuPassStatus.cancelled: break; // user dismissed
case DocuPassStatus.error: break; // network / fatal
}
},
)
Getting a reference (server side, Node.js example) #
import { DocuPass } from "idanalyzer2";
const docupass = new DocuPass("YOUR_API_KEY", "YOUR_PROFILE_ID", "US");
const session = await docupass.createDocuPass();
// Send session.reference to the app.
Customization — labels, languages & branding #
DocuPassView(
reference: reference,
brandColor: '#1565C0',
logoUrl: 'https://yourbrand.example.com/logo.png',
labels: const {
'selectDocumentTitle': 'Sélectionnez votre document',
'phoneTitle': 'Vérifiez votre téléphone',
'phoneSendSms': 'Envoyer le SMS',
'faceForward': 'Regardez droit devant et ne bougez pas',
},
onResult: (result) { /* ... */ },
)
labels keys are the label names (re-word or localize to any language). See the
full label list. Need a
completely custom UI? Use the native
Android /
iOS headless API.
API #
DocuPassView:
| Param | Type | Notes |
|---|---|---|
reference |
String |
required — the DocuPass reference |
partyId |
String? |
party sign-token (multi-party contract flows) |
baseUrl |
String? |
base URL override (on-prem ID Fort) |
brandColor |
String? |
brand color, hex (e.g. '#1565C0') |
logoUrl |
String? |
logo for the welcome screen |
labels |
Map<String,String>? |
label overrides (any language) |
onResult |
void Function(DocuPassResult) |
terminal callback |
DocuPassResult: { status: DocuPassStatus, reference, code?, message?, redirectUrl? }.
onResult only tells your app that the flow ended — it carries no verified
identity data. The verified data and decision arrive on your server: via the
webhook on your DocuPass profile (recommended, with retries), or GET /docupass/{reference}
server-side with your API key. Never use a client-side result as the decision.
Links #
- 🌐 ID Analyzer: www.idanalyzer.com
- 🪪 DocuPass product: idanalyzer.com/products/docupass.html
- 📚 Developer docs & KB: developer.idanalyzer.com/help
- 📱 This SDK's guide: developer.idanalyzer.com/help/docupass-flutter-sdk
- 🔑 Customer portal / API keys: portal2.idanalyzer.com