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

ActiveLibrary[Payment Processing](/categories/payments)

shoket/php-shoket
=================

Shoket is a PHP client for the Shoket Payment API.

v0.0.5(3y ago)42513[2 PRs](https://github.com/alphaolomi/php-shoket/pulls)1MITPHPPHP ^8.0

Since Jan 1Pushed 2y agoCompare

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

READMEChangelog (4)Dependencies (3)Versions (10)Used By (1)

Shoket Client for PHP
=====================

[](#shoket-client-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/59e77e039c108523c24de878d5b49fbcf1d1e501abe871278355ebc0cc34a52d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686f6b65742f7068702d73686f6b65742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shoket/php-shoket)[![Tests](https://github.com/alphaolomi/php-shoket/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/alphaolomi/php-shoket/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/a48e4cb759792707273611993c00dd3e67ac29f0f6100897674ae024623f3031/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686f6b65742f7068702d73686f6b65742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shoket/php-shoket)

A Truly simple payments for your business. Shoket makes online payments more easier for all kind of business in Tanzania. From startups, small businesses to medium and large businesses.

Documentation
-------------

[](#documentation)

You can find the documentation for this package on [Docs](https://alphaolomi.github.io/php-shoket/)

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

[](#installation)

> Requires PHP 8.0 or higher

> For Laravel users there is a dedicated intergration package [laravel-shoket](https://github.com/alphaolomi/laravel-shoket)

You can install the package via composer:

```
composer require shoket/php-shoket
```

Usage
-----

[](#usage)

```
// Create a new instance of the client
$shoket = new Shoket(['apiSecret' => 'your-api-key']);

// Make a payment request
$response = $shoket->makePaymentRequest([
    "amount" => "5000",
    "customer_name" => "John Doe",
    "email" => "john@user.com",
    "number_used" => "255612345678",
    "channel" => "Tigo",
]);

// Print the response
print_r($response);
```

API Available
-------------

[](#api-available)

- makePaymentRequest
- verifyPayment

Make payment request API
------------------------

[](#make-payment-request-api)

Example

```
// Create a new instance of the client
$shoket = new Shoket(['apiSecret' => 'your-api-key']);

// Make a payment request
$response = $shoket->makePaymentRequest([
    "amount" => "5000",
    "customer_name" => "John Doe",
    "email" => "john@user.com",
    "number_used" => "255612345678",
    "channel" => "Tigo",
]);

// Print the response
var_dump($response);
```

verifyPayment API
-----------------

[](#verifypayment-api)

Example

```
$shoketClient = new Shoket(['apiSecret' => 'your-api-key']);

// Get the payment reference from the a successful payment request
// Sample: adz49dS428b7kbDTdG4MN
$reference = 'your-reference-number';

$response  = $shoketClient->verifyPaymentRequest($reference,[
    "provider_name"=> "Vodacom",
    "provider_code"=> "MPESA"
]);

var_dump($response);
```

Testing
-------

[](#testing)

Uses [Pest Testing Framework](https://pestphp.com/)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

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

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~21 days

Total

6

Last Release

1447d ago

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

---

Tags

mobile-moneypayment-apipaymentsphpphp-shoketpaymentsmobile-moneytanzaniaalphaolomipayment\_apishoketphp-shoket

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

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

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

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

PHPackages © 2026

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