sabi-customer

    1.0.1 • Public • Published

    Sweet Pipeline Preview

    Sabi Customer

    npm version GitHub license Build Status Scrutinizer Code Quality GitHub issues

    Description

    A Know Your Customer (KYC) Node Js Package to verify business's customer identity using SMILE IDENTITY, APPRUVE and CREDEQUITY KYC services. This service currently support countries like Nigeria(NG), Ghana(GH), Kenya(KE), Uganda(UG).

    Installation

    Node 13 + required.

    To get the latest version of Sabi Customer, simply install it

    npm install sabi-customer

    Configuration

    Once Sabi-Customer is installed, you will need to add the following credentials gotten from the different KYC service providers to your .env. Click on their names it will redirect you to their websites where you can sign up and get there API KEYs.

    If you are using a hosting service like heroku, ensure to add the above details to your configuration variables.

    SMILE_API_KEY = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
    SMILE_PARTNER_ID = xxxx;
    APPRUVE_API_KEY = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
    CREDEQUITY_API_URL = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;

    Usage

    const SabiCustomer = require("sabi-customer");
    
    const sabiCustomer = new SabiCustomer();
    Supported Handlers:
    SMILE, APPRUVE, CREDEQUITY;

    If you want a specific handler to handle your request you can pass a second argument to the verifyID() method as shown below, else ignore it and it will pass through sabi-customer's pipeline and return the result and the pipe that handled it

    Note all data used here are dummy data, to get test data you can visit the individual KYC service provider's websites and get data to test

    The implementation is Asynchronous make sure you use async function

    const response = await sabiCustomer.verifyID(payload, "SMILE");
    
    console.log(response);

    For Nigeria (NG)

    APPRUVE SERVICE

    ID Verification
    Supported ID Types Values:
    NIN, BVN, DRIVERS_LICENSE, PASSPORT, TIN, VOTER_CARD;
    const payload = {
      id: "48126406145",
      id_type: "ID_TYPE_VALUE",
      country: "NG",
      first_name: "Michael",
      last_name: "Olugbenga",
      middle_name: "Peter",
      date_of_birth: "1982-05-20",
    };
    
    const response = await sabiCustomer.verifyID(payload);

    SMILE IDENTITY SERVICE

    ID Verification

    Supported ID Types Values:

    NIN_SLIP, BVN, DRIVERS_LICENSE, CAC, TIN, VOTER_ID;
    const payload = {
      id: "48126406145",
      id_type: "ID_TYPE_VALUE",
      country: "NG",
      first_name: "Michael",
      last_name: "Olugbenga",
      user_id: "USER_UNIQUE_ID",
      company: "COMPANY_NAME", //Include this for CAC
    };
    
    const response = await sabiCustomer.verifyID(payload);

    CREDEQUITY SERVICE

    ID Verification
    Supported ID Types Values:
    NIN, BVN, DRIVERS_LICENSE;
    const payload = {
      id: "00000000000",
      id_type: "ID_TYPE",
      first_name: "KAYODE",
      last_name: "BABATUNDE",
      date_of_birth: "24-11-1975",
      phone_number: "1234567890",
    };
    
    const response = await sabiCustomer.verifyID(payload);

    For Ghana (GH)

    SMILE IDENTITY SERVICE

    ID Verification

    Supported ID Types Values:

    SSNIT, VOTER_ID, DRIVERS_LICENSE;
    const payload = {
      id: "48126406145",
      id_type: "ID_TYPE_VALUE",
      country: "GH",
      first_name: "Michael",
      last_name: "Olugbenga",
      user_id: "USER_UNIQUE_ID",
    };
    
    const response = await sabiCustomer.verifyID(payload);

    APPRUVE SERVICE

    ID Verification

    Supported ID Types Values:

    SSNIT, TIN, DRIVERS_LICENSE, PASSPORT, VOTER_CARD;
    const payload = {
      id: "48126406145", //For TIN change this to tin
      id_type: "ID_TYPE_VALUE",
      country: "GH",
      first_name: "Michael",
      last_name: "Olugbenga",
      date_of_birth: "24-11-1975",
    };
    
    const response = await sabiCustomer.verifyID(payload);

    For Kenya (KE)

    SMILE IDENTITY SERVICE

    ID Verification

    Supported ID Types Values:

    ALIEN_CARD, NATIONAL_ID, PASSPORT;
    const payload = {
      id: "48126406145",
      id_type: "ID_TYPE_VALUE",
      country: "KE",
      first_name: "Michael",
      last_name: "Olugbenga",
      user_id: "USER_UNIQUE_ID",
    };
    
    const response = await sabiCustomer.verifyID(payload);

    APPRUVE SERVICE

    ID Verification

    Supported ID Types Values:

    NATIONAL_ID, KRA, PASSPORT;
    const payload = {
      id: "48126406145", //For KRA Change this to pin
      id_type: "ID_TYPE_VALUE",
      country: "KE",
      first_name: "Michael",
      last_name: "Olugbenga",
      date_of_birth: "24-11-1975",
    };
    
    const response = await sabiCustomer.verifyID(payload);

    Credequity not supported for Kenya

    For South Africa (ZA)

    SMILE IDENTITY SERVICE

    ID Verification

    Supported ID Types Values:

    NATIONAL_ID, NATIONAL_ID_NO_PHOTO;
    const payload = {
      id: "48126406145",
      id_type: "ID_TYPE_VALUE",
      country: "ZA",
      first_name: "Michael",
      last_name: "Olugbenga",
      user_id: "USER_UNIQUE_ID",
    };
    
    const response = await sabiCustomer.verifyID(payload);

    Credequity and Appruve not supported for South Africa

    For Uganda (UG)

    APPRUVE SERVICE

    ID Verification

    Supported ID Types Values:

    TELCO_SUBSCRIBER;
    const payload = {
      id: "48126406145",
      id_type: "ID_TYPE_VALUE",
      country: "UG",
      phone: "+256000000003",
    };
    
    const response = await sabiCustomer.verifyID(payload);

    Credequity and Smile not supported for Uganda

    Changelog

    Please see CHANGELOG for more information what has changed recently.

    Contributing

    Please see CONTRIBUTING for details.

    Security

    If you discover any security related issues, please email abrahamudele@gmail instead of using the issue tracker.

    Credits

    License

    The MIT License (MIT). Please see License File for more information.

    Install

    npm i sabi-customer

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    140 kB

    Total Files

    23

    Last publish

    Collaborators

    • bytesfield