PHPackages                             openpesa/laravel-pesa - 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. openpesa/laravel-pesa

ActiveLibrary[API Development](/categories/api)

openpesa/laravel-pesa
=====================

Easy OpenAPI integration for Laravel Apps

v1.0.2(4y ago)2153610[1 PRs](https://github.com/openpesa/laravel-pesa/pulls)MITPHPPHP ^7.4|^8.0

Since Apr 1Pushed 2y ago6 watchersCompare

[ Source](https://github.com/openpesa/laravel-pesa)[ Packagist](https://packagist.org/packages/openpesa/laravel-pesa)[ Docs](https://github.com/openpesa/laravel-pesa)[ Patreon](https://www.patreon.com/alphaolomi)[ RSS](/packages/openpesa-laravel-pesa/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (5)Dependencies (12)Versions (7)Used By (0)

Laravel pesa
============

[](#laravel-pesa)

 [ ![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)

   ![Laravel pesa](./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. 💰

 [View Demo](https://github.com/alphaolomi/laravel-pesa-demo) · [Report Bug](https://github.com/openpesa/laravel-pesa/issues/new/choose) · [Request Feature](https://github.com/openpesa/laravel-pesa/issues/new/choose)

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 openpesa/laravel-pesa
```

💼 Usage
-------

[](#-usage)

### Using Facades

[](#using-facades)

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

// This route will be mapped to: `your-URL/api/charge`
Route::get('/charge', function () {
    $response = Pesa::c2b([
        'input_Amount' => 5000, // Amount to be charged
        'input_Country' => 'TZN',
        'input_Currency' => 'TZS',
        'input_CustomerMSISDN' => '000000000001', // Replace with your phone number
        'input_ServiceProviderCode' => '000001', // Replace with your service provider code given by M-Pesa
        'input_ThirdPartyConversationID' => 'mpesatz', // Unique
        'input_TransactionReference' => 'imethibitishwa', // Unique
        'input_PurchasedItemsDesc' => 'Item description'
    });

    return $response;
});
```

💼 Usage
-------

[](#-usage-1)

```
composer test
```

📜 Changelog
-----------

[](#-changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

🤝 Contributing
--------------

[](#-contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

🔐 Security Vulnerabilities
--------------------------

[](#-security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

👥 Credits
---------

[](#-credits)

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

📄 License
---------

[](#-license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 51.7% 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 ~84 days

Total

5

Last Release

1531d ago

Major Versions

v0.0.3 → v1.0.02022-03-03

PHP version history (3 changes)v0.0.2PHP ^7.1

v0.0.3PHP ^7.1|^8.0

v1.0.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7534dd7341d883267be41935354b56c27f94d6bbd6a7abd9f257bb2d494a3798?d=identicon)[alphao](/maintainers/alphao)

---

Top Contributors

[![alphaolomi](https://avatars.githubusercontent.com/u/10551599?v=4)](https://github.com/alphaolomi "alphaolomi (31 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")[![pro-cms](https://avatars.githubusercontent.com/u/57701433?v=4)](https://github.com/pro-cms "pro-cms (4 commits)")[![JemCdo](https://avatars.githubusercontent.com/u/40404495?v=4)](https://github.com/JemCdo "JemCdo (1 commits)")[![makindajack](https://avatars.githubusercontent.com/u/22730819?v=4)](https://github.com/makindajack "makindajack (1 commits)")

---

Tags

hacktoberfesthacktoberfest-acceptedlaravelopenpesaphplaravelmpesaopenpesalaravel-pesa

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/openpesa-laravel-pesa/health.svg)

```
[![Health](https://phpackages.com/badges/openpesa-laravel-pesa/health.svg)](https://phpackages.com/packages/openpesa-laravel-pesa)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.0k7.8M57](/packages/dedoc-scramble)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)

PHPackages © 2026

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