onIDVAgentKYCResponse

🛰️ onIDVAgentKYCResponse API Documentation

🧾 Overview

The onIDVAgentKYCResponse event is triggered by the REL-ID SDK after completion of the KYC process initiated via initiateAgentKYCforUser. It provides the result of the agent-assisted KYC workflow for a newly onboarded customer.

🎯 Purpose

To notify the agent application of the success or failure status of the KYC process initiated on behalf of a customer. It marks the end of the agent-driven KYC journey.

🚀 Triggered After

This event is triggered upon completion of:

  1. Document scan and confirmation
  2. Selfie capture and confirmation
  3. Biometric Opt-in consent (if enabled)

🧾 Sample Payload

{
  "shortErrorCode": 0,
  "errorMessage": "Success",
  "status": 200,
  "kycStatus": "SUCCESS"
}

📥 Payload Fields

FieldTypeDescription
shortErrorCodeIntegerError code representing the result. 0 means success.
errorMessageStringMessage detailing success or nature of the failure.
statusIntegerHTTP-style status code (e.g., 200 for success).
kycStatusString"SUCCESS" or "FAILED" – status of the KYC process.

✅ Success Handling

  • If kycStatus is "SUCCESS" and shortErrorCode is 0, display a confirmation to the agent.
  • Optionally log the status or sync to internal customer database.

❌ Failure Handling

  • If kycStatus is "FAILED" or shortErrorCode is non-zero:
    • Show an appropriate error to the agent.
    • Provide options for retry or escalation.

🧠 Usage Notes

  • This event is the final callback in the agent KYC flow.
  • Developers must handle this to transition out of the KYC workflow gracefully.