bytesfield/simple-kyc

A PHP package for Know Your Customer (KYC)

v1.0.1 2021-06-15 09:06 UTC

This package is auto-updated.

Last update: 2024-04-15 19:49:36 UTC


README

Simple-Kyc Preview

Simple KYC

Latest Stable Version GitHub license Scrutinizer Code Quality Build Status Code Intelligence Status GitHub issues Total Downloads

Description

A Know Your Customer (KYC) PHP 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

PHP 7.4+ and Composer are required.

To get the latest version of Simple-Kyc, simply require it.

composer require bytesfield/simple-kyc

Or add the following line to the require block of your composer.json file.

"bytesfield/simple-kyc": "1.0.*"

You'll then need to run composer install or composer update to download it and have the autoloader updated.

Configuration

Once simple-kyc 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

require 'vendor/autoload.php'; //Exclude this when using Frameworks like Laravel etc.

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$response = $simpleKyc->verifyId($payload = []);
Supported Handlers:
SMILE, APPRUVE, CREDEQUITY;

The request will pass through simple-kyc's pipeline and return the result and the pipe that handled the verification request

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

For Nigeria (NG)

APPRUVE SERVICE

ID Verification
Supported ID Types Values:
NIN, BVN, DRIVERS_LICENSE, PASSPORT, TIN, VOTER_CARD;
require 'vendor/autoload.php';

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$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',
];

$response = $simpleKyc->verifyId($payload);

SMILE IDENTITY SERVICE

ID Verification

Supported ID Types Values:

NIN_SLIP, BVN, DRIVERS_LICENSE, CAC, TIN, VOTER_ID;
require 'vendor/autoload.php';

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$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
];

$response = $simpleKyc->verifyId($payload);

CREDEQUITY SERVICE

ID Verification
Supported ID Types Values:
NIN, BVN, DRIVERS_LICENSE;
require 'vendor/autoload.php';

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$payload = [
    'id' => '00000000000',
    'id_type' => 'ID_TYPE_VALUE',
    'country' => 'NG',
    'first_name' => 'KAYODE',
    'last_name' => 'BABATUNDE',
    'date_of_birth' => '24-11-1975',
    'phone_number' => '1234567890',
];

$response = $simpleKyc->verifyId($payload);

For Ghana (GH)

SMILE IDENTITY SERVICE

ID Verification

Supported ID Types Values:

SSNIT, VOTER_ID, DRIVERS_LICENSE;
require 'vendor/autoload.php';

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$payload = [
    'id' => '48126406145',
    'id_type' => 'ID_TYPE_VALUE',
    'country' => 'GH',
    'first_name' => 'Michael',
    'last_name' => 'Olugbenga',
    'user_id' => 'USER_UNIQUE_ID',
];

$response = $simpleKyc->verifyId($payload);

APPRUVE SERVICE

ID Verification

Supported ID Types Values:

SSNIT, TIN, DRIVERS_LICENSE, PASSPORT, VOTER_CARD;
require 'vendor/autoload.php';

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$payload = [
    'id' => '48126406145',
    'id_type' => 'ID_TYPE_VALUE',
    'country' => 'GH',
    'first_name' => 'Michael',
    'last_name' => 'Olugbenga',
    'date_of_birth': '24-11-1975',
];

$response = $simpleKyc->verifyId($payload);

For Kenya (KE)

SMILE IDENTITY SERVICE

ID Verification

Supported ID Types Values:

ALIEN_CARD, NATIONAL_ID, PASSPORT;
require 'vendor/autoload.php';

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$payload = [
    'id' => '48126406145',
    'id_type' => 'ID_TYPE_VALUE',
    'country' => 'KE',
    'first_name' => 'Michael',
    'last_name' => 'Olugbenga',
    'user_id' => 'USER_UNIQUE_ID',
];

$response = $simpleKyc->verifyId($payload);

APPRUVE SERVICE

ID Verification

Supported ID Types Values:

NATIONAL_ID, KRA, PASSPORT;
require 'vendor/autoload.php';

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$payload = [
    'id' => '48126406145',
    'id_type' => 'ID_TYPE_VALUE',
    'country' => 'KE',
    'first_name' => 'Michael',
    'last_name' => 'Olugbenga',
    'date_of_birth' => "24-11-1975",
];

$response = $simpleKyc->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;
require 'vendor/autoload.php';

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$payload = [
    'id' => '48126406145',
    'id_type' => 'ID_TYPE_VALUE',
    'country' => 'ZA',
    'first_name' => 'Michael',
    'last_name' => 'Olugbenga',
    'user_id' => "USER_UNIQUE_ID",
];

$response = $simpleKyc->verifyId($payload);

Credequity and Appruve not supported for South Africa

For Uganda (UG)

APPRUVE SERVICE

ID Verification

Supported ID Types Values:

TELCO_SUBSCRIBER;
require 'vendor/autoload.php';

use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

$payload = [
    'id' => '48126406145',
    'id_type' => 'ID_TYPE_VALUE',
    'country' => 'UG',
    'phone_number' => '+256000000003',

];

$response = $simpleKyc->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.