PHPackages                             edwinmugendi/sapamapay - 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. [Payment Processing](/categories/payments)
4. /
5. edwinmugendi/sapamapay

ActiveLibrary[Payment Processing](/categories/payments)

edwinmugendi/sapamapay
======================

Sapama Pay API - MPESA, Equitel, Sapama Pay API

3954452[2 issues](https://github.com/edwinmugendi/sapamapay/issues)PHP

Since Sep 26Pushed 2y ago6 watchersCompare

[ Source](https://github.com/edwinmugendi/sapamapay)[ Packagist](https://packagist.org/packages/edwinmugendi/sapamapay)[ RSS](/packages/edwinmugendi-sapamapay/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![](https://cloud.githubusercontent.com/assets/829059/9216039/82be51cc-40f6-11e5-88f5-f0cbd07bcc39.png)](https://cloud.githubusercontent.com/assets/829059/9216039/82be51cc-40f6-11e5-88f5-f0cbd07bcc39.png)

[![Build Status](https://camo.githubusercontent.com/cb0ad4a373c5908232d2e349cf6d26fc67c3abfb78a124dfe8221f7245bca375/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f64696e676f2f6170692f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/dingo/api)[![License](https://camo.githubusercontent.com/a1198ceff122e0c68a8fe43c16907dd296532ea316fbd138383f31ba3cdba6b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64696e676f2f6170692e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Development Version](https://camo.githubusercontent.com/32200090b3c29070986a79209286f8b56c115c1f911cbf8ff60ec324640ecdf8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f64696e676f2f6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dingo/api)[![Monthly Installs](https://camo.githubusercontent.com/0c4a487158c1de1b17dce12ddf904a9d347ed424b9f016ee20a86b354fa7e901/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f64696e676f2f6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dingo/api)[![StyleCI](https://camo.githubusercontent.com/3ccc0430ce6afaa4cd0d19a86c10976b589162e71714d59f9975d6f5e3402406/68747470733a2f2f7374796c6563692e696f2f7265706f732f31383637333532322f736869656c64)](https://styleci.io/repos/18673522)

SapamaPay API
-------------

[](#sapamapay-api)

This library is an API wrapper to the following [Safaricom MPESA API's](https://developer.safaricom.co.ke/)

- [Lipa Na M-Pesa Online Payment API](https://developer.safaricom.co.ke/lipa-na-m-pesa-online/apis/post/stkpush/v1/processrequest)
- [Lipa Na M-Pesa Query Request API](https://developer.safaricom.co.ke/lipa-na-m-pesa-online/apis/post/stkpushquery/v1/query)
- [Account Balance Request](https://developer.safaricom.co.ke/account-balance/apis/post/query)
- [B2B Payment Request](https://developer.safaricom.co.ke/b2b/apis/post/paymentrequest)
- [B2C Payment Request](https://developer.safaricom.co.ke/b2c/apis/post/paymentrequest)
- [Transaction Status Request](https://developer.safaricom.co.ke/transaction-status/apis/post/query)
- [C2B Simulate Transaction](https://developer.safaricom.co.ke/c2b/apis/post/simulate)
- [C2B Register URL](https://developer.safaricom.co.ke/c2b/apis/post/registerurl)
- [Reversal](https://developer.safaricom.co.ke/reversal/apis/post/request)
- [Generate Token](https://developer.safaricom.co.ke/oauth/apis)

\##Installation

\###Requirements

PHP &gt;=4.0.2

Add `edwinmugendi/sapamapay` to `composer.json`.

```
"edwinmugendi/sapamapay": "master"

```

Run `composer update` to pull down the latest version.

Or run

```
composer require edwinmugendi/sapamapay

```

Without composer. Download the source code and `require_once` the `autoload.php`

```
require_once __DIR__ . '/../vendor/autoload.php';

```

\##Testing Update the `$api` variable to the API you want to run.

```
