PHP code example of bytesfield / simple-kyc

1. Go to this page and download the library: Download bytesfield/simple-kyc library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bytesfield / simple-kyc example snippets




use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

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

NIN, BVN, DRIVERS_LICENSE, PASSPORT, TIN, VOTER_CARD;



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);

NIN_SLIP, BVN, DRIVERS_LICENSE, CAC, TIN, VOTER_ID;



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);



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);

SSNIT, VOTER_ID, DRIVERS_LICENSE;



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);

SSNIT, TIN, DRIVERS_LICENSE, PASSPORT, VOTER_CARD;



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);

ALIEN_CARD, NATIONAL_ID, PASSPORT;



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);

NATIONAL_ID, KRA, PASSPORT;



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);

NATIONAL_ID, NATIONAL_ID_NO_PHOTO;



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);

TELCO_SUBSCRIBER;



use Bytesfield\SimpleKyc\SimpleKyc;

$simpleKyc = new SimpleKyc();

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

];

$response = $simpleKyc->verifyId($payload);
javascript
SMILE_API_KEY = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
SMILE_PARTNER_ID = xxxx;
javascript
APPRUVE_API_KEY = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
javascript
CREDEQUITY_API_URL = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;