Prompt
How do I set up an identity verification API for branch-to-digital account opening with document capture and liveness checks?
Latest observation
To set up an identity verification API for branch-to-digital account opening with document capture and liveness checks, you typically want a flow that:
- starts in your branch or app,
- captures an ID document,
- verifies the person is present and real,
- returns a decision your onboarding system can use.
Here’s a practical implementation outline.
1) Define the onboarding flow
A common branch-to-digital flow looks like this:
- Create an application/session
- Collect customer consent
- Capture document images
- Run document verification
- Run face match
- Run liveness detection
- Return verification result
- Allow account opening or route to manual review
2) Choose the API capabilities you need
Look for an identity verification platform or build components that support:
-
Document capture
- Front/back image upload
- Mobile camera capture SDK or web capture SDK
- Image quality checks: blur, glare, crop, glare, tamper detection
-
Document authentication
- MRZ or barcode reading
- OCR extraction
- Security feature checks
- Expiry and field validation
-
Face verification
- Face detected in document
- Face embedding comparison between document photo and live selfie
-
Liveness detection
- Passive liveness: user simply takes a selfie
- Active liveness: user performs actions like blinking or turning head
-
Decisioning
- Pass / fail / refer
- Configurable thresholds
- Audit trail
-
Compliance features
- Consent tracking
- Encryption
- Data retention controls
- AML/KYC integration if needed
3) Suggested API architecture
Core objects
-
Customer/Application
- Your onboarding record
-
Verification Session
- A short-lived transaction for one identity check
-
Document Capture
- Front/back images, metadata, OCR result
-
Selfie/Liveness Check
- Selfie frames, liveness score, face match score
-
Verification Result
- Final status, reasons, confidence, audit references
4) Example API flow
Step A: Create a verification session
Your backend creates a session when a branch associate starts onboarding.
POST /verification-sessions
Example response:
{
"session_id": "vs_12345",
"upload_url": "https://api.vendor.com/upload/vs_12345",
"status": "pending"
}
Step B: Capture document
Use a mobile/web SDK in the branch tablet or customer device to capture:
- front of ID
- back of ID if required
- optional proof of address
Then upload to the API.
POST /verification-sessions/vs_12345/documents
Content-Type: multipart/form-data
Step C: Run document verification
The vendor API processes:
- document authenticity
- OCR
- field parsing
- template validation
Response might include:
{
"document_status": "verified",
"document_type": "passport",
"ocr": {
"first_name": "Jane",
"last_name": "Doe",
"dob": "1990-03-11"
},
"quality": "good"
}
Step D: Capture selfie and perform liveness
Use a selfie capture SDK or API endpoint.
POST /verification-sessions/vs_12345/selfie
The API should return:
- liveness result
- face match score
- confidence level
Example:
{
"liveness_status": "passed",
"liveness_score": 0.98,
"face_match_score": 0.94,
"selfie_quality": "good"
}
Step E: Get final decision
GET /verification-sessions/vs_12345/result
Example response:
{
"decision": "approved",
"reasons": [],
"risk_level": "low",
"reference_id": "kyc_78910"
}
Possible decisions:
approveddeclinedmanual_review
5) Key implementation requirements
Frontend / branch device
- Camera capture SDK for iOS/Android/web
- Real-time image quality feedback
- Consent screens
- Retry handling
Backend
- Secure session creation
- Store only minimal sensitive data
- Use webhooks or polling for completion
- Map verification result to onboarding workflow
Security
- TLS everywhere
- Encryption at rest
- Signed requests / OAuth2 or API keys
- Short-lived session tokens
- Access control for branch staff
- Audit logs
6) Recommended account-opening business rules
You may want rules like:
-
Approve if:
- document verified
- liveness passed
- face match above threshold
- age and residency checks pass
-
Manual review if:
- low image quality
- borderline face match
- mismatch in OCR fields
- expired or damaged document
-
Decline if:
- document fraudulent
- liveness failed
- face mismatch is severe
- duplicate identity detected
7) Branch-to-digital specific considerations
Because this starts in a branch but ends digitally:
- Let the branch associate initiate the session on a tablet or kiosk
- Send a secure link/SMS/QR code so the customer can continue on their own device
- Persist the onboarding state across branch and remote channels
- Ensure the branch staff cannot see more sensitive data than necessary
- Support assisted capture for customers unfamiliar with mobile verification
8) Webhook pattern
Prefer webhooks for asynchronous results.
Example:
POST /webhooks/identity-verification
Payload:
{
"session_id": "vs_12345",
"event": "verification.completed",
"decision": "approved",
"risk_level": "low"
}
This avoids constant polling and keeps your UI responsive.
9) Example onboarding sequence
- Branch associate opens customer profile.
- Backend creates
verification_session. - Customer scans ID using branch tablet.
- SDK checks image quality.
- Document is uploaded and verified.
- Customer takes selfie.
- Liveness and face match are completed.
- Final decision is returned.
- If approved, account is opened digitally.
- If flagged, route to manual compliance review.
10) Compliance and operational notes
Depending on jurisdiction, you may need:
- explicit customer consent
- retention limits for ID images and biometrics
- explainability for automated decisions
- KYC/AML checks
- sanctions/PEP screening
- data residency controls
Also confirm whether your use of biometric data requires special notices or retention policies.
11) Build vs buy
Buy if you want speed
Use a vendor that offers:
- SDKs for capture
- liveness
- document verification
- workflow orchestration
- compliance support
Build if you need maximum control
You’ll need:
- camera SDK integration
- OCR/document parsing
- face recognition
- liveness model
- risk engine
- fraud monitoring
- secure storage and audit logging
Most teams use a vendor API for capture + verification and integrate it into their own account-opening system.
12) Minimal integration checklist
- Create verification session endpoint
- Integrate document capture SDK
- Upload front/back ID images
- Integrate selfie/liveness capture
- Receive webhook for completion
- Map results to onboarding decision
- Log audit trail
- Encrypt and minimize stored data
- Add manual review fallback
If you want, I can also provide:
- a sample API spec for this flow,
- a Node.js/Python implementation example,
- or a reference architecture diagram for branch-to-digital onboarding.