getIDVSelfieConfirmation
🔄 Event: getIDVSelfieConfirmation
getIDVSelfieConfirmation📘 Description
This event is triggered by the REL-ID SDK module to confirm the match result between the document photo and the captured selfie before continuing the activation or KYC workflow.
🎯 Purpose
This event prompts the app to:
- Display the captured selfie
- Show the user portrait from document
- Present the match score and display text
- Ask for user consent to proceed or retry
🧑💻 Platform Support
React Native
EventEmitter.addListener('getIDVSelfieConfirmation', getIDVSelfieConfirmation);Flutter
rdna.on(RdnaClient.getIDVSelfieConfirmation, getIDVSelfieConfirmation);Cordova
document.addEventListener('getIDVSelfieConfirmation', getIDVSelfieConfirmation, false);Native iOS
(void)getIDVSelfieConfirmation:(RDNAChallengeOpMode)mode workflow:(RDNAIDVWorkflow)workflow;Native Android
void getIDVSelfieConfirmation(int challengeMode, RDNA.RDNAIDVWorkflow workflow);📤 Response Format (String based)
{
"challengeMode":8,
"response_data":”<<The response_data contains the Selfie Confirmation JSON v3.0>>”
}Selfie Confirmation JSON v3.0
{
"response_data": {
"analyze_liveness_response": {
"video": {
"autocapture_result": {
"selfie_image": "<Base64 Image>"
},
"liveness_result": {
"score": 100
}
}
},
"face_matcher_response": {
"score": 4.674335479736328
},
"biometric_result": {
"display_text": "MATCHED",
"result_criteria": "Greater than or equal to 1.6"
},
"document_detail": {
"document_info": {
"name": "testUser",
"age": "28",
"portrait_image": "<<base 64 String>>"
}
}
},
"action_buttons": {
"success_button": [
{
"key": "continue-flow",
"button_text": "Continue"
}
],
"failure_button": [
{
"key": "continue-flow",
"button_text": "Continue Anyway"
},
{
"key": "reinit-idv-document-scan",
"button_text": "Rescan Document"
},
{
"key": "reinit-idv-selfie",
"button_text": "Recapture Selfie"
}
]
}
}
📦 Selfie Confirmation JSON v3.0 Details
📄 Click to expand
🔸 analyze_liveness_response
analyze_liveness_responsevideo.autocapture_result.selfie_image₹
video.autocapture_result.selfie_image₹- 📸 Base64-encoded selfie image captured during liveness check.
- 👉 Display to user for confirmation.
video.liveness_result.score
video.liveness_result.score- 🔢 Score indicating how likely the selfie is a live person.
- ✅ Higher is better (e.g., out of 100).
🔸 face_matcher_response
face_matcher_responsescore
score- 🔢 Raw facial match score between selfie and document portrait.
- 🔍 Lower or higher scores may be better based on the algorithm.
🔸 biometric_result
biometric_resultdisplay_text
display_text- 🧾 Describes match result like "MATCHED" or "NOT MATCHED".
- 👉 Display to the user as match summary.
result_criteria
result_criteria- 📌 Explains the rule used to determine a match (e.g., “>= 1.6”).
🔸 document_detail.document_info
document_detail.document_infoname
name- 👤 Name extracted from the document.
age
age- 🎂 Age of the user based on document DOB.
portrait_image
portrait_image- 🖼️ Base64-encoded image of the document's photo.
- 👉 Display for visual side-by-side comparison with selfie.
🔸 action_buttons
action_buttons✅ success_button[]
success_button[]Actions for when the user confirms the match.
key: Internal action ID (e.g.,continue-flow)button_text: Text to display on confirmation button
🔁 failure_button[]
failure_button[]Actions for when the user rejects the result.
key: One ofcontinue-flow,reinit-idv-document-scan,reinit-idv-selfiebutton_text: Corresponding text for UI button
🧠 Developer Tips
| UI Element | JSON Field |
|---|---|
| Selfie Image | selfie_image |
| Document Portrait | portrait_image |
| Match Score | score |
| Match Summary | display_text |
| Action Buttons | action_buttons.success_button[], failure_button[] |
🧠 Notes for Developers
- The app must read response_data.biometric_result.display_text to determine whether to auto-confirm or ask for consent.
- Use the action_buttons.success_button and failure_button to render confirmation or retry options.
- All images (like selfie_image, portrait_image) are in base64 format and should be rendered inline in the UI.
- The match score is optional UI indicators and not mandatory for flow control.
🧭 Example User Flow
flowchart TD
A[SDK triggers getIDVSelfieConfirmation] --> B[App displays selfie, document image, score]
B --> C{User choice}
C -->|✅ Confirm| D[App calls setIDVSelfieConfirmation("continue-flow", challengeMode)]
C -->|🔁 Retake| E[App calls setIDVSelfieConfirmation("reinit-idv-selfie", challengeMode)]
🛠️ Response API: setIDVSelfieConfirmation
Description:
Used by the application to confirm or reject the captured selfie based on user input.
Parameters:
| Parameter | Type | Description |
|---|---|---|
action | String | One of the predefined keys from action_buttons JSON |
challengeMode | Integer | Mode received from getIDVSelfieConfirmation event |
🧠 Action Keys & Their Significance
| Action Key | Description |
|---|---|
continue-flow | REL-ID SDK will proceed to the next configured event in the workflow |
reinit-idv-document-scan | SDK will trigger getIDVDocumentScanProcessStartConfirmation again |
reinit-idv-selfie | SDK will restart selfie capture flow |
Developers must pass one of the above keys asactioninsetIDVSelfieConfirmation.
💻 API Usage
React Native
RdnaClient.setIDVSelfieConfirmation(true, workflow, challengeMode, (response) => {
// handle RDNAError
});Flutter
rdna.setIDVSelfieConfirmation(true, workflow, challengeMode);Cordova
com.uniken.rdnaplugin.RdnaClient.setIDVSelfieConfirmation(
successCallback,
errorCallback,
[true, workflow, challengeMode]
);Native iOS
(RDNAError *)setIDVSelfieConfirmation:(BOOL)isConfirmed
workflow:(RDNAIDVWorkflow)workflow
challengeMode:(RDNAChallengeOpMode)mode;Native Android
RDNA.RDNAError setIDVSelfieConfirmation(boolean isConfirmed,
RDNA.RDNAIDVWorkflow workflow,
int challengeMode);⚠️ Error Codes
| Code | Description | Developer Action |
|---|---|---|
| 146 | Selfie not confirmed | Prompt for retake or fallback |
| 400 | Invalid input or state | Retry with valid values |
✅ Notes
- Confirmation is a mandatory step after selfie capture
- Failure to call this API will stall the IDV workflow
Updated 27 days ago
