getIDVSelfieConfirmation
š Event: getIDVSelfieConfirmation
getIDVSelfieConfirmationš Description
This event is triggered by the Ditto 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 | Ditto 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 4 months ago
