1.0.1 • Published 5 years ago

@armenotech/kyc v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Using KYC React component

📦 Install

npm install --save @armenotech/kyc
yarn add @armenotech/kyc

🔨 Usage

import KYC from '@armenotech/kyc';

const App = () => {
  const kycStatus = (data) => {
    ...
  };
  
  return (
    <>
      <KYC
        level={Number(level)}
        cookieName='kyc_api_token'
        appId='67erfe53-674365-5465jhjds-fgjdhg'
        kycStatus={kycStatus}
      />
    </>
  );
};

📄 API

PropertyDescriptionTypeDefault
levelCurrent level to show (from 1 to 4)number1
languageLocalization.  Available languages: en.stringen
cookieNameCookie namestring-
appIdApplication idstring-
kycStatusKYC levels status callback.(data) => object-

kycStatus callback answer example:

{
    1: 'ready', // Level status.
    2: 'notReady', // Level status.
    3: 'notReady', // Level status.
    4: 'notReady', // Level status.
    kycPassed: false, // Is KYC passed.
    needToApproveLevel: 2, // Level which need to approve.
}

Level statuses description:

  • ready - document set ready for verification
  • notReady - document set not ready for verification
  • pending - document set in verification process
  • reject - document set rejected and document need re-check
  • done - document set approved