PHPackages                             algoetech/openapi\_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. algoetech/openapi\_mpesa

ActiveLibrary[API Development](/categories/api)

algoetech/openapi\_mpesa
========================

Easy OpenAPI integration for Laravel Applications

0.01(2y ago)052MITPHPPHP ^8.0CI failing

Since Jun 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/algoetech/openapi_mpesa)[ Packagist](https://packagist.org/packages/algoetech/openapi_mpesa)[ RSS](/packages/algoetech-openapi-mpesa/feed)WikiDiscussions master Synced yesterday

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

Algoetech OpenAPI Mpesa
=======================

[](#algoetech-openapi-mpesa)

 [ ![Latest Version on Packagist](https://camo.githubusercontent.com/b0dba0409bd02bead8d00645824a3df2a282e073185b4626dc507750d1055a05/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f70656e706573612f6c61726176656c2d706573612e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/openpesa/laravel-pesa) [ ![Total Downloads](https://camo.githubusercontent.com/f4eadc9a9ab40abd2c8f4c3c655e0fc2645f36f19e08f0ef488cde91571754eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f70656e706573612f6c61726176656c2d706573612e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/openpesa/laravel-pesa)

   ![Algoetech OpenAPI Mpesa](./img/banner/header-light.png)

Offers effortless integration with mobile money operators, such as Vodacom's M-Pesa, for seamless inclusion in your Laravel applications. 💰

Documentation
-------------

[](#documentation)

🚧 **Work in Progress**

For detailed instructions on package usage, please refer to the example readme available [here](https://github.com/alphaolomi/laravel-pesa-demo).

🚀 Installation
--------------

[](#-installation)

You can install the package via Composer:

```
composer require algoetech/openapi_mpesa
```

💼 Usage
-------

[](#-usage)

### Using Facades

[](#using-facades)

\*Web|api Route

```
    Route::post('/pay', [PaymentController::class, 'payment'])->name('payments_api');
```

\*Controller \[ PaymentController \]

```
use Openpesa\Pesa\Facades\Pesa;

// This function will be mapped to web|api route: `your-URL/api/pay`
// assuming you have data captured from a form
public function payment(PaymentApiRequest $req) {
    $response = Pesa::c2b([
        'input_Amount' => $req->price, // Amount to be charged
        'input_Country' => 'TZN',
        'input_Currency' => 'TZS',
        'input_CustomerMSISDN' => '255'.$req->msisdn, // assuming you capture phone number without country code and zero
        'input_ServiceProviderCode' => '000001', // Replace with your service provider code given by M-Pesa
        'input_ThirdPartyConversationID' => 'mpesatz', // Unique [use a rand function to isolate ConversationId]
        'input_TransactionReference' => 'imethibitishwa', // Unique []
        'input_PurchasedItemsDesc' => $req->item
    ]);

    // make your logics to handle responses here
    return $response;
};
```

💼 Usage
-------

[](#-usage-1)

```
composer test
```

👥 Credits
---------

[](#-credits)

- [All Contributors](../../contributors)

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

740d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/88344708?v=4)[Tairo Aman](/maintainers/tairocruiz)[@tairocruiz](https://github.com/tairocruiz)

---

Top Contributors

[![algoetech](https://avatars.githubusercontent.com/u/136216514?v=4)](https://github.com/algoetech "algoetech (3 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

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

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

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[lettermint/lettermint-laravel

Official Lettermint driver for Laravel

1190.2k1](/packages/lettermint-lettermint-laravel)

PHPackages © 2026

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