PHPackages                             macdanson/jpesa-php-sdk - 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. macdanson/jpesa-php-sdk

ActiveLibrary[API Development](/categories/api)

macdanson/jpesa-php-sdk
=======================

PHP SDK for JPesa API (Credit/Debit GWallet, Transaction lookup, KYC) with optional Laravel integration.

V1.0(6mo ago)11MITPHPPHP &gt;=8.0

Since Nov 11Pushed 6mo agoCompare

[ Source](https://github.com/macdanson/jpesa-php-sdk)[ Packagist](https://packagist.org/packages/macdanson/jpesa-php-sdk)[ RSS](/packages/macdanson-jpesa-php-sdk/feed)WikiDiscussions main Synced 1mo ago

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

JPesa PHP SDK (with Laravel support)
====================================

[](#jpesa-php-sdk-with-laravel-support)

A lightweight, Composer-ready PHP SDK for the **JPesa API**: Credit/Debit GWallet, Transaction Info, and KYC.

- **Base URL:** `https://my.jpesa.com/api/`
- **Auth:** Provide your `_key_` (API key).

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

[](#installation)

```
composer require macdanson/jpesa-php-sdk
```

Quick start (vanilla PHP)
-------------------------

[](#quick-start-vanilla-php)

```
use JPesa\SDK\JPesaClient;

$client = new JPesaClient(
    baseUrl: 'https://my.jpesa.com/api/',
    apiKey: getenv('JPESA_API_KEY') ?: 'YOUR_KEY'
);

// Credit
$res = $client->credit([
  'mobile' => '256752567374',
  'amount' => 1000,
  'tx'     => 'ORDER-12345',
]);
```

### Other calls

[](#other-calls)

```
$client->debit([ 'mobile'=>'2567...', 'amount'=>500, 'tx'=>'PAYOUT-1' ]);

$client->transactionInfo([ 'tid'=>'TXN-ID-ABC' ]);
// or: $client->transactionInfo([ 'pid'=>'PAYMENT-ID-XYZ' ]);
// or: $client->transactionInfo([ 'cur'=>'UGX' ]);

$client->kyc('2567...');
```

Laravel usage
-------------

[](#laravel-usage)

1. **Publish config** (optional):

```
php artisan vendor:publish --tag=config --provider="JPesa\SDK\Laravel\JPesaServiceProvider"
```

This will create `config/jpesa.php`.

2. **Set env**:

```
JPESA_API_KEY=your_live_or_sandbox_key
JPESA_BASE_URL=https://my.jpesa.com/api/
JPESA_TIMEOUT=30

```

3. **Resolve via DI**:

```
use JPesa\SDK\JPesaClient;

public function charge(JPesaClient $jpesa) {
    $jpesa->credit(['mobile'=>'2567...','amount'=>1000,'tx'=>'ORDER-1']);
}
```

4. **Or use Facade**:

```
use JPesa\SDK\Laravel\Facades\JPesa;

JPesa::debit(['mobile'=>'2567...','amount'=>500,'tx'=>'PAYOUT-1']);
```

Webhooks / Callbacks
--------------------

[](#webhooks--callbacks)

Pass a `callback` URL in `credit()`/`debit()` if you want JPesa to notify your app. Always verify fields like `tid` and your `tx` to ensure idempotency.

Testing
-------

[](#testing)

```
composer install
composer test
```

Unit tests use Guzzle's MockHandler to simulate API responses.

License
-------

[](#license)

MIT

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance68

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

188d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18343cac3e930b59966d42ba304b704951ac48008cc8d4e9313dbd9bfe7ff49a?d=identicon)[macdanson](/maintainers/macdanson)

---

Top Contributors

[![macdanson](https://avatars.githubusercontent.com/u/44835839?v=4)](https://github.com/macdanson "macdanson (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/macdanson-jpesa-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/macdanson-jpesa-php-sdk/health.svg)](https://phpackages.com/packages/macdanson-jpesa-php-sdk)
```

###  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)
