1.0.1 • Published 5 years ago
@armenotech/kyc v1.0.1
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
Property | Description | Type | Default |
---|---|---|---|
level | Current level to show (from 1 to 4 ) | number | 1 |
language | Localization. Available languages: en . | string | en |
cookieName | Cookie name | string | - |
appId | Application id | string | - |
kycStatus | KYC 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 verificationnotReady
- document set not ready for verificationpending
- document set in verification processreject
- document set rejected and document need re-checkdone
- document set approved