PHPackages                             patricmutwiri/pesapal - 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. patricmutwiri/pesapal

ActiveLibrary[Payment Processing](/categories/payments)

patricmutwiri/pesapal
=====================

Pesapal Laravel Package; Payments via pesapal in laravel made easy.

v1.1.0(1y ago)32052MITPHPPHP ^7.4|^8.0

Since Aug 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/patricmutwiri/pesapal-laravel)[ Packagist](https://packagist.org/packages/patricmutwiri/pesapal)[ Docs](https://github.com/patricmutwiri/pesapal-laravel)[ RSS](/packages/patricmutwiri-pesapal/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (13)Used By (0)

Pesapal Package for Laravel Framework
=====================================

[](#pesapal-package-for-laravel-framework)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b0231952a5afaed32d2aee00d2290af88975e7657539b2cc75422c3a487b9dd1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061747269636d7574776972692f7065736170616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/patricmutwiri/pesapal)[![Total Downloads](https://camo.githubusercontent.com/991efade53fdf3604229403cfbcf092bd3d0d9ba5da61cac630e3486c72d474c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7061747269636d7574776972692f7065736170616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/patricmutwiri/pesapal)[![GitHub Actions](https://github.com/patricmutwiri/pesapal-laravel/actions/workflows/main.yml/badge.svg)](https://github.com/patricmutwiri/pesapal-laravel/actions/workflows/main.yml/badge.svg)

This package is meant to help you integrate painlessly with Pesapal. In the end, you can receive payments through Pesapal API v3.0 in your application.

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

[](#installation)

You can install the package via composer:

```
composer require patricmutwiri/pesapal
```

Usage
-----

[](#usage)

```
// Load your invoice from DB, like
$invoice = Invoice::find(1);
// Then use it below
$paymentReq = new Request([
    'amount' => $invoice->balance,
    'email' => $invoice->user->email,
    'phone' => $invoice->user->phone,
    'first_name' => explode(' ', $invoice->user->name)[0],
    'last_name' => explode(' ', $invoice->user->name)[1],
    'id' => sprintf("%s-%s", $invoice->invoice_number, date('YmdHis')),
]);

// you can pass ipn_id above from your DB, or let the service add the latest one for you.

return Pesapal::payNow($paymentReq);
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

Contributing
------------

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead and log it under the issue tracker. All security vulnerabilities will be promptly addressed. Please do not disclose serious security-related issues publicly until a fix has been announced.

Credits
-------

[](#credits)

- [Patrick Mutwiri](https://github.com/patricmutwiri)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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

Every ~36 days

Recently: every ~0 days

Total

11

Last Release

641d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/46ab28e0a1c918b4e0da0153a4791589c76a14b70a86378bb20d817d906db60a?d=identicon)[patricmutwiri](/maintainers/patricmutwiri)

---

Top Contributors

[![patricmutwiri](https://avatars.githubusercontent.com/u/7590159?v=4)](https://github.com/patricmutwiri "patricmutwiri (84 commits)")

---

Tags

paymentsREST APIcardmpesavisapesapalpatricmutwiri

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/patricmutwiri-pesapal/health.svg)

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

###  Alternatives

[knox/pesapal

A laravel package that integrates into the pesapal api

29106.3k](/packages/knox-pesapal)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[cybersource/rest-client-php

Client SDK for CyberSource REST APIs

39881.3k6](/packages/cybersource-rest-client-php)[itsmurumba/laravel-mpesa

Laravel Package for Mpesa Daraja API

191.6k](/packages/itsmurumba-laravel-mpesa)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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