PHPackages                             smodav/ipay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. smodav/ipay

ActiveLibrary[API Development](/categories/api)

smodav/ipay
===========

iPay Africa PHP package for transaction handling

v1.1.0(8y ago)71.9k11[1 issues](https://github.com/SmoDav/ipay/issues)MITPHPPHP &gt;=5.6

Since Jun 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/SmoDav/ipay)[ Packagist](https://packagist.org/packages/smodav/ipay)[ RSS](/packages/smodav-ipay/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

iPay Africa Web Based Integration API
=====================================

[](#ipay-africa-web-based-integration-api)

[![Build Status](https://camo.githubusercontent.com/eb0c6b278e032e548ffb8083fbe35599b23d55f602b40b700d967ac305e03de4/68747470733a2f2f7472617669732d63692e6f72672f536d6f4461762f697061792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/SmoDav/ipay)[![Total Downloads](https://camo.githubusercontent.com/041b4cf97715c3723053312c3ccc883047f1ee66c89ea62af49bf3f9c4984185/68747470733a2f2f706f7365722e707567782e6f72672f736d6f6461762f697061792f642f746f74616c2e737667)](https://packagist.org/packages/smodav/ipay)[![Latest Stable Version](https://camo.githubusercontent.com/39949b497d71bb37e6d0e3f3de3bd815e17f5abcafa7b2efb862c30cd535704d/68747470733a2f2f706f7365722e707567782e6f72672f736d6f6461762f697061792f762f737461626c652e737667)](https://packagist.org/packages/smodav/ipay)[![Latest Unstable Version](https://camo.githubusercontent.com/82fbea94b1b72b4c8661aa812e0fca6cf7db6d5d022497dd7d5c1d2a989d24cc/68747470733a2f2f706f7365722e707567782e6f72672f736d6f6461762f697061792f762f756e737461626c652e737667)](https://packagist.org/packages/smodav/ipay)[![License](https://camo.githubusercontent.com/a70a886516bef9b92bd81ea6eb39b2119c9ea4b6fb00272f1ce23cc9ba75996b/68747470733a2f2f706f7365722e707567782e6f72672f736d6f6461762f697061792f6c6963656e73652e737667)](https://packagist.org/packages/smodav/ipay)

This is a PHP package for iPay Africa Web based integration. The API allows a merchant to initiate C2B transaction and receive payments from the customers.

Installation
------------

[](#installation)

Pull in the package through Composer.

```
composer require smodav/ipay
```

Usage
-----

[](#usage)

To make a request is simple. Just initiate the `Cashier` and finalize the transaction:

```
use SmoDav\iPay\Cashier;

require "vendor/autoload.php";

$cashier = new Cashier();

$response = $cashier
    ->usingVendorId('your vendor id', 'your vendor secret')
    ->withCallback('http://yourcallback.com')
    ->withCustomer('0722000000', 'demo@example.com', false)
    ->transact(10, 'your order id', 'your order secret');
```

The `$response` variable will hold the html response from iPay. Just render it to the page and the process would be complete.

Payment Channels
----------------

[](#payment-channels)

By default, you are able to transact with multiple channels. The package default are:

- MPesa
- Airtel Money
- Equity
- Credit Card
- Debit Card

In order to use other channels, you can call the `usingChannels()` method with a channel array. The currently available channels are:

- Cashier::CHANNEL\_MPESA
- Cashier::CHANNEL\_AIRTEL
- Cashier::CHANNEL\_EQUITY
- Cashier::CHANNEL\_MOBILE\_BANKING
- Cashier::CHANNEL\_DEBIT\_CARD
- Cashier::CHANNEL\_CREDIT\_CARD
- Cashier::CHANNEL\_MKOPO\_RAHISI
- Cashier::CHANNEL\_SAIDA

For example:

```
use SmoDav\iPay\Cashier;

require "vendor/autoload.php";

$cashier = new Cashier();

$transactChannels = [
    Cashier::CHANNEL_MPESA,
    Cashier::CHANNEL_AIRTEL,
];

$response = $cashier
    ->usingChannels($transactChannels)
    ->usingVendorId('your vendor id', 'your vendor secret')
    ->withCallback('http://yourcallback.com')
    ->withCustomer('0722000000', 'demo@example.com', false)
    ->transact(10, 'your order id', 'your order secret');
```

Disclaimer
----------

[](#disclaimer)

The iPay API has a bug of displaying channels that have not been enabled and vice versa.

License
-------

[](#license)

The M-Pesa Package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3248d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dffc9fa88d88bb577590c2321207aee2fb18cc32d99342d6ddfb5f19731a7e69?d=identicon)[SmoDav](/maintainers/SmoDav)

---

Top Contributors

[![SmoDav](https://avatars.githubusercontent.com/u/2639600?v=4)](https://github.com/SmoDav "SmoDav (2 commits)")

---

Tags

apilaraveltransactionsmpesacredit-cardipayairtel-money

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/smodav-ipay/health.svg)

```
[![Health](https://phpackages.com/badges/smodav-ipay/health.svg)](https://phpackages.com/packages/smodav-ipay)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)[kabangi/mpesa

M-Pesa API implementation

453.0k2](/packages/kabangi-mpesa)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
