Installation
You will receive an API key and a Client ID from SmartComply. Keep these secure and do not commit them to source control.
pubspec.yaml:
How It Works
createSession()
Authenticates your app using
apiKey + clientId.Endpoint: POST /v1/session/create → returns a session token used by all subsequent calls.onboarding.verify()
Verifies the user’s identity against a government ID (BVN or NIN).Endpoint:
POST /v1/onboarding/verify → returns Identity confirmed.liveness.startCheck()
Opens the camera full-screen and runs the liveness challenge:
- Face detection runs entirely on-device via ML Kit — no live streaming to the server.
- Autoshot captured →
POST /v1/liveness/create→ returns an Entry ID. - Video uploaded →
POST /v1/liveness/submit→ returns the result.
Platform Setup
- Android
- iOS
In In
android/app/src/main/AndroidManifest.xml, add inside <manifest>:android/app/build.gradle (or build.gradle.kts):Initialisation
| Parameter | Required | Description |
|---|---|---|
apiKey | ✅ | API key issued by SmartComply. Used to authenticate session creation. |
clientId | ✅ | UUID of your SDK config record. Ties the session to your account settings. |
environment | Optional | Environment.production or Environment.sandbox. Defaults to sandbox. |
timeout | Optional | HTTP timeout. Defaults to 15 seconds. |
Step 1 — Create a Session
Must be called before any other SDK method. All subsequent calls automatically use the session token.
Step 2 — Verify Identity
OnboardingType | ID |
|---|---|
OnboardingType.bvn | Bank Verification Number |
OnboardingType.nin | National Identification Number |
Step 3 — Liveness Check
Opens the camera full-screen, guides the user through actions, captures a photo and video, and submits both to the backend:Supported Challenge Actions
ChallengeAction | API value sent | Detection method |
|---|---|---|
ChallengeAction.blink | BLINK | ML Kit eye open probability |
ChallengeAction.turnLeft | TURN_LEFT | ML Kit head euler Y angle |
ChallengeAction.turnRight | TURN_RIGHT | ML Kit head euler Y angle |
ChallengeAction.turnHead | TURN_HEAD | ML Kit head euler Y angle (either direction) |
ChallengeAction.openMouth | OPEN_MOUTH | Heuristic (confirmed by backend video AI) |
After
liveness/submit, the status will be "processing" while the backend AI analyses the video. The final passed or failed status is delivered via webhook to your webhook_url.