onIDVOptInCapturedFrameConfirmation
🔍 Overview
🧪 Event: onIDVOptInCapturedFrameConfirmation
onIDVOptInCapturedFrameConfirmationThis event is triggered after the Ditto ID SDK captures the user's selfie during the biometric opt-in flow.
It provides a preview image and prompts the app to let the user either confirm the image, retry, or cancel the process.
🖥️ Recommended UI
When this event is received:
- Show the captured selfie image (base64 encoded).
- Present options to:
- ✅ Approve
- 🔁 Retry
- ❌ Cancel
🧾 Sample Payload
{
"frameData": "<Base64EncodedImageData>",
"message": "Confirm captured frame",
"status": {
"statusCode": 100,
"statusMessage": "Frame captured"
},
"error": {
"longErrorCode": 0,
"shortErrorCode": 0,
"errorString": "Success"
}
}📊 Field Descriptions
| Field | Type | Description |
|---|---|---|
frameData | string | Base64-encoded image of the captured selfie |
message | string | User prompt message |
status | object | SDK status structure |
error | object | SDK error structure |
🧩 Follow-Up API: setIDVBiometricOptInConfirmation
setIDVBiometricOptInConfirmationThis API must be invoked in response to onIDVOptInCapturedFrameConfirmation, based on the user's action.
✳️ API Definition
🧠 React Native
RdnaClient.setIDVBiometricOptInConfirmation(status, (response) => {});🐦 Flutter
rdna.setIDVBiometricOptInConfirmation(status);🌐 Cordova
com.uniken.rdnaplugin.RdnaClient.setIDVBiometricOptInConfirmation(successCallback, errorCallback, [status]);📱 Native iOS
(RDNAError*)setIDVBiometricOptInConfirmation:(RDNAIDVStatus)status;🤖 Native Android
RDNA.RDNAError setIDVBiometricOptInConfirmation(RDNAIDVStatus status);📥 Parameters
| Parameter | Type | Description |
|---|---|---|
status | RDNAIDVStatus | Enum to indicate if selfie is approved/rejected |
🧾 Enum Values for status
status| Enum Value | Meaning |
|---|---|
RDNA_IDV_SELFIE_APPROVED | Proceed with captured selfie |
RDNA_IDV_SELFIE_REJECTED | Retake the selfie |
RDNA_IDV_SELFIE_CANCELLED | Cancel the biometric opt-in process |
✅ Developer Flow
| Event/API | Developer Action |
|---|---|
onIDVOptInCapturedFrameConfirmation | Show selfie and ask user to confirm |
setIDVBiometricOptInConfirmation | Call with appropriate status enum |
onIDVBiometricOptInStatus | Handle success or failure of biometric enrollment |
📛 Error Codes
| Code | Message | Action |
|---|---|---|
| 100 | Frame captured successfully | Proceed with preview UI |
| 500 | Internal capture error | Prompt for retry or cancel |
🔗 Related APIs
initiateIDVBiometricOptIn()— Starts the biometric flowonIDVBiometricOptInStatus()— Final status of the opt-in process
Updated 8 months ago
Did this page help you?
