0.1.1 • Published 8 months ago

next-identity-kyc v0.1.1

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

next-identity-kyc

IdentityPass NextJS Verification library

INTRODUCING PREMBLY 2.0

NPM JavaScript Style Guide

Install

npm install --save next-identity-kyc

Usage

import React from "react";
import useIdentityPayKYC from "next-identity-kyc";

const App = () => {
  const config = {
    first_name: "test",
    last_name: "test",
    email: "kayode@myidentitypass.com",
    merchant_key: "",
    user_ref: "a unique ref for your user",
    is_test: false, //set this to through for a test
    config_id: "<configuration ID retrieve from your widget settings", //optional
    callback: (response) => console.log(response),
  };
  const verifyWithIdentity = useIdentityPayKYC(config);

  return <button onClick={verifyWithIdentity}>Click to Test</button>;
};
export default App;
RESPONSES

1. Failed response:
         {
          code: "E01",
          message: "Message goes here",
          status: "failed"
      }

 2. Cancelled
      {
          code: "E02",
          message: "Verification Canceled",
          status: "failed"
      }
 3. Success
        {
          code: "00",
          status: "success",
          message: "Verification Successful",
          data:{
              //Verification data goes here
              // kindly check official documentation for data structure for each channel
              //https://developer.myidentitypass.com
              },
          channel:"Channel goes here", e.g BVN,NIN and many more

      }

License

MIT © kayode001(Kayode Olayiwola) "# next-identity-kyc"