getIDVSelfieConfirmation

🔔 Event: getIDVSelfieConfirmation

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

📥 Sample Payload - React Native, Flutter, Cordova, Native iOS

{
  "challengeMode":8,
  "response_data":”<<The response_data contains the Selfie Confirmation JSON v3.0>>”
}

📥 Sample Payload - Native Android

{
  "mode":8,
  "selfieDetails":”<<The selfieDetails 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,
      "score_percent": 0
    },
    "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

video.autocapture_result.selfie_image

  • 📸 Base64-encoded selfie image captured during liveness check.
  • 👉 Display to user for confirmation.

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

score

  • 🔢 Raw facial match score between selfie and document portrait.
  • 🔍 Lower or higher scores may be better based on the algorithm.

score_percent

  • 📊 Percentage representation of face match confidence.
  • 👉 Useful for UI match indicators.

🔸 biometric_result

display_text

  • 🧾 Describes match result like "MATCHED" or "NOT MATCHED".
  • 👉 Display to the user as match summary.

result_criteria

  • 📌 Explains the rule used to determine a match (e.g., “>= 1.6”).

🔸 document_detail.document_info

name

  • 👤 Name extracted from the document.

age

  • 🎂 Age of the user based on document DOB.

portrait_image

  • 🖼️ Base64-encoded image of the document's photo.
  • 👉 Display for visual side-by-side comparison with selfie.

🔸 action_buttons

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[]

Actions for when the user rejects the result.

  • key: One of continue-flow, reinit-idv-document-scan, reinit-idv-selfie
  • button_text: Corresponding text for UI button

🧠 Developer Tips

UI ElementJSON Field
Selfie Imageselfie_image
Document Portraitportrait_image
Match Scorescore, score_percent
Match Summarydisplay_text
Action Buttonsaction_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 and score_percent are 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)]

💻 Code Snippet

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);

🛠️ API to submit user action : setIDVSelfieConfirmation

🧭 Overview

Used by the application to confirm or reject the captured selfie based on user input.


🧾 Parameters for React Native, Flutter, Native iOS & Native Android

ParameterTypeDescription
actionStringOne of the predefined keys from action_buttons JSON
challengeModeIntegerMode received from getIDVSelfieConfirmation event

🧾 Parameters for Cordova

ParameterTypeDescription
actionStringOne of the predefined keys from action_buttons JSON
optModeIntegerMode received from getIDVSelfieConfirmation event
successCallbackSync success callback.
errorCallbackSync error callback, returns RDNAError if any.

🧠 Action Keys & Their Significance

Action KeyDescription
continue-flowREL-ID SDK will proceed to the next configured event in the workflow
reinit-idv-document-scanSDK will trigger getIDVDocumentScanProcessStartConfirmation again
reinit-idv-selfieSDK will restart selfie capture flow
🔧

Developers must pass one of the above keys as action in setIDVSelfieConfirmation.


💻 Code Snippet

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

CodeDescriptionDeveloper Action
146Selfie not confirmedPrompt for retake or fallback
400Invalid input or stateRetry with valid values

✅ Notes

  • Confirmation is a mandatory step after selfie capture
  • Failure to call this API will stall the IDV workflow