PHPackages                             bixi/client - 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. bixi/client

ActiveLibrary[Payment Processing](/categories/payments)

bixi/client
===========

A PHP client for Bixi payment processor.

2.0.0(11mo ago)0251MITPHPPHP ^8.3CI passing

Since Oct 27Pushed 11mo ago3 watchersCompare

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

READMEChangelog (3)Dependencies (8)Versions (5)Used By (0)

Bixi PHP Client
===============

[](#bixi-php-client)

MainDevCoverageVersion[![Main](https://github.com/BixiHQ/php-client/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/BixiHQ/php-client/actions/workflows/tests.yml/badge.svg?branch=main)[![Main](https://github.com/BixiHQ/php-client/actions/workflows/tests.yml/badge.svg?branch=dev)](https://github.com/BixiHQ/php-client/actions/workflows/tests.yml/badge.svg?branch=dev)[![Coverage](https://github.com/BixiHQ/php-client/raw/art/coverage.svg)](https://github.com/BixiHQ/php-client/raw/art/coverage.svg)[![Version](https://camo.githubusercontent.com/588888f96439154299d11c5003928e93046b023e87c3b5d86873fde688f12fee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626978692f636c69656e74)](https://camo.githubusercontent.com/588888f96439154299d11c5003928e93046b023e87c3b5d86873fde688f12fee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626978692f636c69656e74)---

This package provides a small client for interacting with the Bixi API to process payments and receive responses.

Features
--------

[](#features)

- Simple and intuitive client setup.
- Comprehensive test coverage using Pest.

Requirements
------------

[](#requirements)

- PHP 8.3 or higher
- Composer
- GuzzleHTTP
- Pest (for testing)

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

[](#installation)

Install the package via Composer:

```
composer require bixi/client
```

Getting Started
---------------

[](#getting-started)

### Step 1: Initialize the Client

[](#step-1-initialize-the-client)

```
use Bixi\Client\Bixi;

$apiToken = 'Your-API-Token';
$bixi = new Bixi($apiToken);
```

### Step 2: Making a Payment Request

[](#step-2-making-a-payment-request)

```
try {
    $response = $bixi->pay([
        'memo' => 'credit',
        'accountNumber' => '+252600000000',
        'accountType' => 'mmt',
        'receiptId' => '123456',
        'amount' => 1.00,
        'description' => 'Payment for invoice No. 123456',
    ]);

    echo "Transaction Successful! Transaction ID: " . $response->getId() . PHP_EOL;
    print_r($response->toArray());
} catch (ClientException $e) {
    echo "Error: {$e->getMessage()}" . PHP_EOL;
    print_r($e->getErrors());
}
```

### Step 3: Handling Responses

[](#step-3-handling-responses)

You can access different parts of the response using methods like `getId()`, `getAttributes()`, and `getAttribute()`:

```
$data = $response->toArray(); // Convert response to an array
$id = $response->getId(); // Transaction ID
$attributes = $response->getAttributes(); // All attributes
$amount = $response->getAttribute('amount'); // Specific attribute
```

### Step 4: Handling Exceptions

[](#step-4-handling-exceptions)

When an error occurs, a `ClientException` will be thrown with detailed error messages:

```
catch (ClientException $e) {
    foreach ($e->getErrors() as $error) {
        echo "Error Code: {$error['code']} - {$error['detail']}" . PHP_EOL;
    }
}
```

Testing
-------

[](#testing)

This package includes comprehensive test coverage using the Pest PHP testing framework. To run the tests, use the following command:

```
./vendor/bin/pest
```

License
-------

[](#license)

This package is licensed under the MIT license. Please see the `LICENSE` file for more information.

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

[](#contributing)

Contributions are welcome! Please feel free to open issues or submit pull requests.

Changelog
---------

[](#changelog)

For the complete list of changes, please see the [changelog file](CHANGELOG.md).

Contact
-------

[](#contact)

For support or inquiries, please contact the package maintainer at .

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance52

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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 ~117 days

Total

3

Last Release

333d ago

Major Versions

1.1.0 → 2.0.02025-06-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fe51fbfcbf7170aec7deacb47d0ca42dbce9b283b57c9d421cdc27160e5ba91?d=identicon)[bixi](/maintainers/bixi)

---

Top Contributors

[![byjml](https://avatars.githubusercontent.com/u/750292?v=4)](https://github.com/byjml "byjml (8 commits)")

---

Tags

paymentsmobile money transfer

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bixi-client/health.svg)

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

###  Alternatives

[unicodeveloper/laravel-paystack

A Laravel Package for Paystack

650975.6k11](/packages/unicodeveloper-laravel-paystack)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[mnastalski/przelewy24-php

Przelewy24 PHP library

52101.2k2](/packages/mnastalski-przelewy24-php)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[prevailexcel/laravel-nowpayments

A Laravel Package for NOWPayments

1414.2k](/packages/prevailexcel-laravel-nowpayments)[itsmurumba/laravel-mpesa

Laravel Package for Mpesa Daraja API

191.6k](/packages/itsmurumba-laravel-mpesa)

PHPackages © 2026

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