onIDVBiometricOptInStatus
🔍 Overview
The onIDVBiometricOptInStatus
event is the final event triggered by the REL-ID SDK after the biometric opt-in process.
It provides the result of the user's attempt to register their selfie as a biometric template on the server.
🖥️ Recommended UI
After receiving this event:
- If successful: Show success message and navigate user forward.
- If failed: Display appropriate error and offer retry or fallback options.
🧾 Sample Payload
{
"status": {
"statusCode": 100,
"statusMessage": "Biometric Opt-In successful"
},
"error": {
"longErrorCode": 0,
"shortErrorCode": 0,
"errorString": "Success"
}
}
📊 Field Descriptions
Field | Type | Description |
---|---|---|
statusCode | int | 100 = success, 400/500 = failure codes |
statusMessage | string | Descriptive message from SDK |
errorCode | int | 0 = success, non-zero = error occurred |
🔁 Event Handler Code Snippets
🧠 React Native
const onIDVBiometricOptInStatus = (event: any) => {
const { status, error } = event;
if (status.statusCode === 100) {
// Show success screen
} else {
// Show retry or fallback UI
}
};
🐦 Flutter
onIDVBiometricOptInStatus(dynamic event) {
final statusCode = event['status']['statusCode'];
final message = event['status']['statusMessage'];
if (statusCode == 100) {
// Success
} else {
// Retry or show error
}
}
🌐 Cordova
document.addEventListener('onIDVBiometricOptInStatus', function(event) {
const statusCode = event.status.statusCode;
if (statusCode === 100) {
// Opt-in successful
} else {
// Handle failure
}
});
📱 Native iOS
- (void)onIDVBiometricOptInStatus:(RDNARequestStatus *)status error:(RDNAError *)error {
if (status.statusCode == 100) {
// Success flow
} else {
// Handle error
}
}
🤖 Native Android
void onIDVBiometricOptInStatus(RDNARequestStatus status, RDNA.RDNAError error) {
if (status.getStatusCode() == 100) {
// Success
} else {
// Show error
}
}
📛 Error Codes
Code | Description | Developer Action |
---|---|---|
100 | Biometric Opt-In successful | Proceed to next step |
400 | Authentication failed | Prompt password/biometric retry |
500 | Liveness/selfie check failed | Allow recapture or fallback auth |
🔗 Related APIs
initiateIDVBiometricOptIn()
— Starts the opt-in processonIDVOptInCapturedFrameConfirmation
— Handles selfie confirmationsetIDVBiometricOptInConfirmation()
— Submits selfie decision
Updated 3 months ago