@armenotech/kyc-sep12

    0.2.45 • Public • Published

    Using KYC SEP12 React component

    📦 Install

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

    🔨 Usage

    import KYC from '@armenotech/kyc-sep12';
    
    const App = () => {
      const kycStatus = (data) => {
        ...
      };
      
      return (
        <>
          <KYC
            token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0b3B0YWwuY2...'
            customerId='6b04b6fd-4ea6-4bde-ad3c-289c8a508fa2'
            kycStatus={kycStatus}
            mainBrandColor={}
            onCloseKycHandler={}
            kycServerUrl='https://example-server-url.com'
          />
        </>
      );
    };

    📄 API

    Property Description Type Default Required
    language Localization.  Available languages: en. string en -
    token JWT token string - required
    customerId Parameter for search user by id string - required
    kycStatus KYC levels status callback. (data) => object - -
    mainBrandColor You can change main brand color of color scheme. string #1E6DFF -
    onCloseKycHandler KYC close (close when kyc approved) callback. (data) => object - -
    kycServerUrl Server url string - required

    kycStatus callback answer example:

    {
        status: 'NEEDS_INFO', // KYC status.
        id: '6b04b6fd-4ea6-4bde-ad3c-289c8a508fa2', // Customer id.
        level: '1', // KYC current level.
    }
    

    Level statuses description:

    • ACCEPTED - document set has been accepted
    • PROCESSING - document set is in flight and client can check again in the future to see if any further info is needed
    • NEEDS_INFO - document set needs more info to be provided to finish KYC
    • REJECTED - This users KYC has failed and will never succeed

    How to use get status method:

    import { kycStatus } from '@armenotech/kyc-sep12';
    
    const { status, id, current_level } = await kycStatus({
        token: 'sSDJSKJDSDHH-SJDHJSHJSDsdasd-asdasd..., // JWT token.
        customerId: 'uwueriewur-nxcv4u3-jsdf7343-dfjsnf443', // Customer id.
        kycServerUrl: 'https://...', // KYC server url.
    });
    

    You will get:

    • status - status of KYC;
    • id - KYC customer id;
    • current_level - KYC current level;

    Install

    npm i @armenotech/kyc-sep12

    DownloadsWeekly Downloads

    146

    Version

    0.2.45

    License

    MIT

    Unpacked Size

    542 kB

    Total Files

    84

    Last publish

    Collaborators

    • yorik0512
    • armenotech-npm-releaser-bot