onIDVOptInCapturedFrameConfirmation

šŸ” Overview

🧪 Event: onIDVOptInCapturedFrameConfirmation

This event is triggered after the REL-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

FieldTypeDescription
frameDatastringBase64-encoded image of the captured selfie
messagestringUser prompt message
statusobjectSDK status structure
errorobjectSDK error structure

🧩 Follow-Up API: setIDVBiometricOptInConfirmation

This 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

ParameterTypeDescription
statusRDNAIDVStatusEnum to indicate if selfie is approved/rejected

🧾 Enum Values for status

Enum ValueMeaning
RDNA_IDV_SELFIE_APPROVEDProceed with captured selfie
RDNA_IDV_SELFIE_REJECTEDRetake the selfie
RDNA_IDV_SELFIE_CANCELLEDCancel the biometric opt-in process

āœ… Developer Flow

Event/APIDeveloper Action
onIDVOptInCapturedFrameConfirmationShow selfie and ask user to confirm
setIDVBiometricOptInConfirmationCall with appropriate status enum
onIDVBiometricOptInStatusHandle success or failure of biometric enrollment

šŸ“› Error Codes

CodeMessageAction
100Frame captured successfullyProceed with preview UI
500Internal capture errorPrompt for retry or cancel

šŸ”— Related APIs

  • initiateIDVBiometricOptIn() — Starts the biometric flow
  • onIDVBiometricOptInStatus() — Final status of the opt-in process