MIN KYC NSDL Iframe HTML

Domain URL:

Below you will find a link to issue card in the iframe.

PROD-SANDBOX:

https://card-webview-sandbox.card91.io/min-kyc?templateId=xoltt&platform=ios

PROD-LIVE:

https://card-webview.card91.io/min-kyc?templateId=xoltt&platform=ios

For NsdlMinKycFlow component takes the following props:

Input props

NameTypeRequiredDescription
environmentstringtrueUse "sandbox" for production sandbox environment and "live" for production environment .
templateIdstringfalseUse to indicate key for design template

The events are as follows:

Event NameDescription
C91_MIN_KYC_INITIALISEDThe NSDL MIN KYC screen has been initialised.
C91_MIN_KYC_SUCCESSThe API request related to the NSDL MIN KYC screen was successful.
C91_MIN_KYC_API_FAILUREThe API request related to theNSDL MIN KYC screen has failed.
C91_MIN_KYC_AUTHENTICATION_FAILUREAuthentication for the NSDL MIN KYC screen has failed.
C91_MIN_KYC_SERVER_FAILUREThe server encountered an error while processing the NSDL MIN KYC request.
C91_MIN_KYC_MISSING_PARAMETERA required parameter is missing in the NSDL MIN KYC request.
C91_MIN_KYC_OTP_SEND_FAILThe API request for generating the OTP for the NSDL MIN KYC has failed.
C91_MIN_KYC_OTP_VERIFICATION_FAILThe API request for validating the OTP has failed for the NSDL MIN KYC
C91_MIN_KYC_MOBILE_ALREADY_EXIST_OR_INVALIDKYC for this mobile number is already done or the mobile number is not valid.
Payload of both these event will be different.

Sample HTML File:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>card91</title>
  <style>
    iframe {
      height: 100vh;
      width: 100%;
    }
  </style>

</head>

<body>
  <script>
      document.addEventListener("message",
      (e) => {
        console.log("e,", e);
         if (e.data.type === "C91_MIN_KYC_INITIALISED") {
                minKYCPage();
            }
           },
          false,
        );
    const childWindow = document.getElementById('nsdl-min-kyc-page').contentWindow;
    window.addEventListener('message', message => {
      debugger
      console.log(message);
    });
    function minKYCPage() {
      try {
        var ORIGIN = "https://card-webview-sandbox.card91.io";
        var params = {
          "payload": {
            mobile: "918630557139", // Card holder mobile number whose KYC needs to be done
          },
          "type": "C91_MIN_KYC_SET_PARAMS"
        }
        document.getElementById("nsdl-min-kyc-page").contentWindow.postMessage(JSON.stringify(params), ORIGIN);
      } catch (error) {
        console.log(error);
      }
    }


  </script>
  <iframe src="https://card-webview-sandbox.card91.io/min-kyc/nsdl?templateId=ypay&platform=ios"
    frameborder="0" allow="midi" id="nsdl-min-kyc-page"></iframe>
  <div>


  </div>
  </div>
</body>

</html>