PHPackages                             alphaolomi/swahilies-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. alphaolomi/swahilies-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alphaolomi/swahilies-php
========================

Swahilies for PHP

v0.1.0(3y ago)62202[2 PRs](https://github.com/alphaolomi/swahilies-php/pulls)MITPHPPHP ^8.1

Since Nov 12Pushed 2y agoCompare

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

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

Swahilies for PHP
=================

[](#swahilies-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a92b665ab5201e5d88aa681de03b596795ef5a69085e6ff86b1f174cce9e4ffb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c7068616f6c6f6d692f73776168696c6965732d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alphaolomi/swahilies-php)[![Tests](https://github.com/alphaolomi/swahilies-php/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/alphaolomi/swahilies-php/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/99d188dbb34456f497f40900615e52e4c939fa57610feaa574440cefb90e7ea3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c7068616f6c6f6d692f73776168696c6965732d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alphaolomi/swahilies-php)

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

[](#installation)

You can install the package via composer:

```
composer require alphaolomi/swahilies-php
```

Usage
-----

[](#usage)

```
use Alphaolomi\Swahilies\Swahilies;

$swahilies = new Swahilies([]);
// Or
$swahilies = Swahilies::create([
    'apiKey' => 'csdheruvhhjdhvjadmvjehrve',
    'username' => 'Company name',
    'isLive' => false, // ie. sandbox mode
]);

$response = $swahilies->payments()->request([
    // TZS by default
    'amount' => 50000,
    // 255 is country code for Tanzania, Only Tanzania is supported for now
    'orderId' => $order->id,
    'phoneNumber' => "255783262616",
    'cancelUrl' => "https://yoursite.com/cancel",
    'webhookUrl' => "https://yoursite.com/response",
    'successUrl' => "https://yoursite.com/success",
    'metadata' => [],
]);

print_r($response);

// Output:
// [
//     "payment_url" => "https://swahiliespay.invict.site/make-payment-1.html?order=jdhvjadmvjehrve"
// ]
```

```
// Webhooks
// You can use the following code to verify the webhook signature

$requestBody = /** get the request body from the webhook request **/;

$isValid = $swahilies->webhooks()
    ->verify($request->getContent()); // true/false
```

Available APIs
--------------

[](#available-apis)

### Payments

[](#payments)

- `all()` - Get all payment transactions
- `directRequest($data)` - Make a direct Push USSD from your app
- `request($data)` - Make a payment request
- `find($id)` - Get payment transaction information

### Webhooks

[](#webhooks)

> 🚧 Work in progress

- `getDisget($data)` - Generate requery body digest
- `verify($data)` - Verify request body

Testing
-------

[](#testing)

Using [PestPHP](https://pestphp.com/) for testing.

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/alphaolomi/.github/blob/main/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

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59.6% 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 ~33 days

Total

3

Last Release

1208d 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 (28 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![george-raphael](https://avatars.githubusercontent.com/u/11408141?v=4)](https://github.com/george-raphael "george-raphael (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

paymentsphpswahiliesalphaolomiswahilies payswahilies-php

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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