PHPackages                             alphaolomi/php-cellulant - 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. alphaolomi/php-cellulant

ActiveLibrary[Payment Processing](/categories/payments)

alphaolomi/php-cellulant
========================

Cellulant PHP SDK

v1.2.0(2y ago)242[1 PRs](https://github.com/alphaolomi/php-cellulant/pulls)MITPHPPHP ^8.1

Since Jul 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/alphaolomi/php-cellulant)[ Packagist](https://packagist.org/packages/alphaolomi/php-cellulant)[ Docs](https://github.com/alphaolomi/php-cellulant)[ Patreon](https://www.patreon.com/alphaolomi)[ RSS](/packages/alphaolomi-php-cellulant/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (0)

Cellulant for PHP
=================

[](#cellulant-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/565b529554381816bb600f0e216d2311e24835a39447dff4a8d45bfb9328cb41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c7068616f6c6f6d692f7068702d63656c6c756c616e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alphaolomi/php-cellulant)[![Tests](https://camo.githubusercontent.com/e0fd80a2c6928fa7c55d234341bc1ffee2fc0eeb671c4cf550949ae778c6d374/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616c7068616f6c6f6d692f7068702d63656c6c756c616e742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/alphaolomi/php-cellulant/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/bf2854bb225cf4d84650e058013140138fd45cf4aeebb77a2f161765e1484e6a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c7068616f6c6f6d692f7068702d63656c6c756c616e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alphaolomi/php-cellulant)

Cellulant for PHP is a PHP client for the [Tingg API](https://dev-portal.tingg.africa/) a product of Cellulant.

Features
--------

[](#features)

The package is centered around Custom Checkout APIs provided by Tingg. It provides the following features:

- Checkout Request
- Charge Request
- Combined Checkout and Charge Request
- Acknowledgement Request
- Query Status
- Refund Request
- OTP Request and Validation

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

[](#installation)

Pre-requisites
--------------

[](#pre-requisites)

- PHP &gt;= 8.0
- PHP `cURL` extension
- Composer Package Manager
- Cellulant API Credentials, obtain them from [Tingg Dev Portal](https://dev-portal.tingg.africa/)

Preferable way to install is with [Composer](https://getcomposer.org/).

You can install the package via Composer:

```
composer require alphaolomi/php-cellulant
```

Usage
-----

[](#usage)

```
use Alphaolomi\CellulantService;

$cellulant = new CellulantService([
    'clientId' => 'your clientId',
    'clientSecret' => 'your clientSecret',
    'apiKey' => 'your api key',
    'serviceCode' => 'your service code',
    'callbackUrl' => 'your callback url',
    'env' => 'sandbox', // or 'production' // default is sandbox
]);

// Authentication
// Get the access token
$authRes = $cellulant->authenticate();
// $authRes is an array with the following keys
// [
//  "token_type" => "bearer",
//  "expires_in" => 3600,
//  "access_token" => "WU3My1AHOcKsnxj3n",
//  "refresh_token" =>   "GSWtHRnJrMHBzdEFPbjhNS0FjODIwMTU1NVlTb3c9PQ=="
// ]

// Checkout Request
$checkoutRes = $cellulant->checkoutRequest([
    // ... Tingg Checkout Request Payload
]);

// Charge Request
$chargeRes = $cellulant->chargeRequest([
    // ... Tingg Charge Request Payload
]);

// Query Status
$queryRes = $cellulant->queryStatus([
    // ... Tingg Checkout Status Payload
]);

// Acknowledgement Request
$ackRes = $cellulant->acknowledgementRequest([
    // ... Tingg Acknowledgement Payload
]);

// Refund Request
$refundRes = $cellulant->refundRequest([
    // ... Tingg Refund Payload
]);
```

Refer to Features Test Cases for more usage examples.

Refer to Tingg API documentation for the required parameters reference for each method.

Notes
-----

[](#notes)

- Calling `authenticate()` is not automatic, you have to call it manually before making any request.
- Calling `authenticate()` will keep the accessToken in memory for subsequent requests.
- Calling `authenticate()` only supports the `client_credentials` grant type. And will return an array with the following keys: `token_type`, `expires_in`, `access_token`, `refresh_token`.
- Error handling is not yet implemented, so you have to handle errors manually.
- Methods accept an array of parameters, which are then converted to JSON before making the request. Refer to Tingg API documentation for the required parameters.
- Methods array parameters are *NOT* validated, so you have to make sure you pass the correct parameters. With exception of `construct()` method which validates the required parameters.
- Method names are the same as the Tingg API endpoints.
- The package uses [Guzzle](https://docs.guzzlephp.org/) to make HTTP requests. Version ^7.0 is used.
- Function Return Types are not implemented yet, so you have to manually cast the return values to the expected type.

Testing
-------

[](#testing)

Tests are written with [Pest](https://pestphp.com/). To run the tests:

```
composer test
```

Support the development
-----------------------

[](#support-the-development)

Do you like this project? Support it by [Star this repository ⭐️](https://github.com/alphaolomi/php-cellulant) and follow me on [Twitter](https://twitter.com/alphaolomi) for more updates 👍.

Changelog
---------

[](#changelog)

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

Versioning
----------

[](#versioning)

This project follows [RomVer](https://github.com/romversioning/romver).

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within Laravel, please send an e-mail to Alpha Olomi via . All security vulnerabilities will be promptly addressed.

Credits
-------

[](#credits)

- [Alpha Olomi](https://github.com/alphaolomi)
- [All Contributors](../../contributors)

Reaching Me
-----------

[](#reaching-me)

If you are having issues with this package, feel free to contact me on [Twitter](https://twitter.com/alphaolomi).

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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 ~1 days

Total

4

Last Release

1038d ago

Major Versions

v0.0.0 → v1.0.02023-07-14

### 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 (32 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

africacellulantpayment-gatewayphptingg-sdkpaymentsalphaolomiphp-cellulantcellulant

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/alphaolomi-php-cellulant/health.svg)

```
[![Health](https://phpackages.com/badges/alphaolomi-php-cellulant/health.svg)](https://phpackages.com/packages/alphaolomi-php-cellulant)
```

###  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)[prevailexcel/laravel-nowpayments

A Laravel Package for NOWPayments

1414.2k](/packages/prevailexcel-laravel-nowpayments)[alphaolomi/laravel-azampay

Laravel Azampay

301.1k](/packages/alphaolomi-laravel-azampay)[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)
