PHPackages                             brikmas/jazzcash-client-php - 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. brikmas/jazzcash-client-php

ActiveLibrary[API Development](/categories/api)

brikmas/jazzcash-client-php
===========================

Jazzcash payment gateway client for PHP

v1.0.0(3y ago)3381MITPHP

Since Sep 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/MasoodRehman/jazzcash-client-php)[ Packagist](https://packagist.org/packages/brikmas/jazzcash-client-php)[ RSS](/packages/brikmas-jazzcash-client-php/feed)WikiDiscussions master Synced today

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

[![Jazzcash](https://camo.githubusercontent.com/c855eea9db9fb6d550762c2e52ac1e424a239900df2df0dca30c3f68d82976df/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f656e2f622f62342f4a617a7a436173685f6c6f676f2e706e67)](https://camo.githubusercontent.com/c855eea9db9fb6d550762c2e52ac1e424a239900df2df0dca30c3f68d82976df/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f656e2f622f62342f4a617a7a436173685f6c6f676f2e706e67)

Jazzcash payment gateway client for PHP
---------------------------------------

[](#jazzcash-payment-gateway-client-for-php)

This client library provides access to the payment gateway web service interface of `Jazzcash`.

Requirements
============

[](#requirements)

- PHP 5.4 or newer
- CURL, JSON
- Credential from `Jazzcash`

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

[](#installation)

The preferred method of installation is via [Composer](https://getcomposer.org/). Run the following command to install the package and add it as a requirement to your project's composer.json:

```
composer require brikmas/jazzcash-client-php

```

Init client
-----------

[](#init-client)

Replace `sandbox` with `payments` for production environment along credentials.

```
$client = new JazzClient([
    'apiBaseUrl' => 'https://sandbox.jazzcash.com.pk/',
    'merchantId' => 'xxxxxx',
    'password' => 'xxxxxx',
    'salt' => 'xxxxxx',
]);
```

Voucher/OTC request
-------------------

[](#voucherotc-request)

Make sure the `CallbackUrl` is same as given in the Jazzcash portal.

```
$txn_ref_no = time();

$request = new VoucherReq();
$request->setAmount(10);
$request->setBillRefNumber($txn_ref_no);
$request->setDescription('Unit test case');
$request->setTxnRefNumber($txn_ref_no);
$request->setVersion('1.1');
$request->setTxnType('OTC');
$request->setCallbackUrl('http://localhost/gateway/jazzcash/callback');
$request->setCustomProperty('03331234567');

$response = $client->callVoucherService($request);
if ($response->pp_ResponseCode == 0) {
    // Handle success response
}
else {
    // Handle fail response
}
```

Testing
-------

[](#testing)

Check the `ClientTest` class add your credentials and run test in order to see the keys are working fine. Make sure the keys are production, Unfortunately `Jazzcash` sandbox keys are not working as expected.

```
./vendor/bin/phpunit tests
```

Bug
---

[](#bug)

If you've found a bug please feel free to open a ticket using the issue tracker.

Credits
-------

[](#credits)

- [MasoodRehman](https://github.com/MasoodRehman)

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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

1392d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b96315cb4efc4b3535c60354e85df9067b1924b9ad80af6e71d13f46a9ddc5e0?d=identicon)[MasoodRehman](/maintainers/MasoodRehman)

---

Top Contributors

[![MasoodRehman](https://avatars.githubusercontent.com/u/14925163?v=4)](https://github.com/MasoodRehman "MasoodRehman (13 commits)")

---

Tags

apigatewayjazzcashpakistanpaymentpayment-gatewayphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brikmas-jazzcash-client-php/health.svg)

```
[![Health](https://phpackages.com/badges/brikmas-jazzcash-client-php/health.svg)](https://phpackages.com/packages/brikmas-jazzcash-client-php)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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