PHPackages                             thiru/mpesa - 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. thiru/mpesa

ActiveLibrary[API Development](/categories/api)

thiru/mpesa
===========

Mpesa api

0.1(8y ago)5547PHP

Since Oct 28Pushed 8y ago3 watchersCompare

[ Source](https://github.com/thirunjuguna/mpesa)[ Packagist](https://packagist.org/packages/thiru/mpesa)[ RSS](/packages/thiru-mpesa/feed)WikiDiscussions develop Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

MPESA API
=========

[](#mpesa-api)

This is a LARAVEL PHP package for the Safaricom's M-Pesa API. The API allows a merchant to initiate C2B online checkout (paybill via web) transactions and perform B2C transaction via the web.

After request submission, the merchant receives instant feedback with validity status of their requests. The C2B API handles customer validation and authentication via USSD push. The customer then confirms the transaction. If the validation of the customer fails or the customer declines the transaction, the API makes a callback to merchant. Otherwise the transaction is processed and its status is made through a callback.

Installation
============

[](#installation)

composer `require thiru/mpesa`

Add \\Thiru\\Mpesa\\MpesaServiceProvider::class on config/app.php

`php artisan vendor:publish --tag=config`

The laravel mpesa Package is open-sourced software licensed under the MIT license.

B2C

`Mpesa::sendMpesaPayment('1000','956555', 'Salary 2017');//$amount,$paybill,$remark`

C2B

`Mpesa::requestMpesaPayment($amount, $mobile, $account, $desc)`

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3121d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c2837b43114132085944dfa8e120a78b68d0fef2f3ccf49334e5236e1750fef?d=identicon)[thirunjuguna](/maintainers/thirunjuguna)

---

Top Contributors

[![esirK](https://avatars.githubusercontent.com/u/13068580?v=4)](https://github.com/esirK "esirK (1 commits)")

---

Tags

apib2cc2blaravelmpesasafaricom

### Embed Badge

![Health badge](/badges/thiru-mpesa/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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