PHP Eyowo Payment API: Process payments using the Eyowo API

Recommend this page to a friend!
  Info   Documentation   View files (16)   Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-02-15 (5 months ago) Not yet rated by the usersTotal: 20 All time: 9,987 This week: 370
Version License PHP version Categories
eyowo-php 1.0The PHP License5PHP 5, Wireless and Mobile, E-Commerce, W...
Description Author

This class can used to process payments using the Eyowo API.

It can send HTTP requests to the Eyewo API Web server to perform several types of operations related with payments. Currently it can:

- Request a token to access the API validating a phone of an user with an account in Eyowo using a code that is sent by SMS to the user phone to authorize to access the API on his behalf.
- Request to pay an amount from the authorized user to another user with a given phone number.
- Request to pay an amount from the authorized user to another user with a given bank account.
- Get the authorized user account balance.

Picture of Zacchaeus Bolaji
  Performance   Level  
Name: Zacchaeus Bolaji <contact>
Classes: 13 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 302016 in Nigeria Nigeria
Week rank: 246 8 in Nigeria Nigeria
Innovation award
Innovation award
Nominee: 8x



CircleCI Latest Stable Version Total Downloads License StyleCI Build Status Scrutinizer Code Quality

A PHP API wrapper for Eyowo.


  • Curl 7.34.0 or more recent (Unless using Guzzle)
  • PHP 5.4.0 or more recent
  • OpenSSL v1.0.1 or more recent


Via Composer

    $ composer require djunehor/eyowo-php


1. Get your API KEYS

2. configure package (optional)

  • Add `EYOWO_APP_KEY` and `EYOWO_APP_SECRET` to your `.env` and set the values

3. Initialise API

use Djunehor\Eyowo\Api;

$production is an optional boolean parameter to specify if to use production URL or sandbox.
// Default is false
$eyowo = new Api($appKey, $production); //if appKey is not passed, package uses value in .env

NOTE: The sandbox URL was not responding as at last test. So, you might just set $production as true

Validate a user

// phone should be in the format 2348020000000

Authenticate user

// sends SMS to user phone

// $code is the 6-digit number send to user phone
$eyowo->generateToken($phone, $code);
'success' => true,
'data' => [
'accessToken' => kjaskajs7a8s6as7a7s68a,
'refreshToken' => askhas7a7s6a7yajgsa67u

$walletToken = $eyowo->getAccessToken();
$refreshToken = $eyowo->getRefreshToken();

Refresh Token


Get banks

$output = $eyowo->banks();
'success' => true,
'data' => [
    'banks' => [
                        "bankCode" => "090270",
                        "bankName" => "AB MICROFINANCE BANK"

$banks = $eyowo->getBanks();

                        "bankCode" => "090270",
                        "bankName" => "AB MICROFINANCE BANK"

Transfer to phone

//amount should be in kobo
$eyowo->transferToPhone($walletToken, $amount, $phone);

Transfer to bank

//amount should be in kobo
$eyowo->transferToPhone($walletToken, $amount, $accountName, $accountNumber, $bankCode);

Wallet Balance

$eyowo->balance($walletToken); returns raw API response
$balance = $eyowo->getBalance(); // returns int|float


// provider has to be one of ['mtn', 'glo', 'etisalat', 'airtel'];
$eyowo->vtu($walletToken, $amount, $phone, $provider);

Change log

Please see CHANGELOG for more information what has changed recently.


  • Clone this repo
  • Run `composer install`
  • Run `cp .env.sample .env`
  • Set your API keys in `.env`
  • Run `composer test`


Please see CONTRIBUTING and CONDUCT for details. Check our todo list for features already intended.


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



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

File Role Description
.circleci (1 file)
.github (4 files)
src (1 file)
tests (1 file)
.editorconfig Data Auxiliary data
.env.sample Data Auxiliary data
.scrutinizer.yml Data Auxiliary data Data Auxiliary data
composer.json Data Auxiliary data Lic. License text
phpunit.xml.dist Data Auxiliary data Doc. Documentation Data Auxiliary data

  Files  /  .circleci  
File Role Description
   config.yml Data Auxiliary data

  Files  /  .github  
File Role Description Data Auxiliary data Data Auxiliary data Data Auxiliary data Data Auxiliary data

  Files  /  src  
File Role Description
   Api.php Class Class source

  Files  /  tests  
File Role Description
   EyowoTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,987
This week:370

For more information send a message to info at phpclasses dot org.