PHPackages                             yo-uganda/yopaymentsphp8x - 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. yo-uganda/yopaymentsphp8x

ActiveLibrary[API Development](/categories/api)

yo-uganda/yopaymentsphp8x
=========================

A PHP 8.x Library to interact with the Yo! Payments API.

1.2(1y ago)0624↑37.5%1MITPHPPHP &gt;=8.0

Since Aug 25Pushed 1y ago2 watchersCompare

[ Source](https://github.com/YO-Uganda/YoPayments-PHP8x)[ Packagist](https://packagist.org/packages/yo-uganda/yopaymentsphp8x)[ RSS](/packages/yo-uganda-yopaymentsphp8x/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Yo! Payments API PHP Library
============================

[](#yo-payments-api-php-library)

Yo! Payments is a revolutionary mobile payments gateway service. Yo! Payments enables businesses to receive payments from their customers via mobile money, as well as make mobile money payments to any mobile money account holder. Yo! Payments also has the capability to send mobile calling credit (“airtime”) directly to users.

Yo! Payments API PHP Library is a PHP library that can be included in your PHP project to enable seamless integration with websites and web systems.

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

[](#getting-started)

### Prerequisites

[](#prerequisites)

To use the API, you must, first of all, have a Yo! Payments Business Account. The API is not available for Personal Accounts

- Yo! Payments API Username
- Yo! Payments API Password

```
$yoAPI = new YoAPI($username, $password);

```

### Installing

[](#installing)

Yo! Payments API PHP Library is available via [Composer/Packagist](https://packagist.org/packages/yo-uganda/yopaymentsphp8x) (using semantic versioning), so just add this line to your `composer.json` file

```
"yo-uganda/yopaymentsphp": "^1.2.0"

```

or

```
composer require yo-uganda/yopaymentsphp8x

```

Then inside your PHP script, add the line

```
require 'vendor/autoload.php';

```

And voila! The Yo! Payments PHP API is now available for use.

Alternatively, copy the contents of the YoPaymentsPHP folder into one of the `include_path` directories specified in your PHP configuration.

If you don't use git, click the 'zip' button at the top of the page in GitHub.

### Minimal Installation

[](#minimal-installation)

While installing the entire package manually or with composer is simple, convenient and reliable, you may want to include only vital files in your project. At the very least you'll need [YoAPI.php](YoAPI.php). If you are doing Instant Payment Notifications, then you'll also require [Yo\_Uganda\_Public\_Certificate.crt](Yo_Uganda_Public_Certificate.crt) for production and [Yo\_Uganda\_Public\_Sandbox\_Certificate.crt](Yo_Uganda_Public_Certificate.crt) for the Sandbox.

You can then load the library by just `require '/path/to/YoAPI.php';` and everything should work.

A Simple Example
----------------

[](#a-simple-example)

Start the Mobile Money User to Prompt for PIN to transfer funds

```
$yoAPI = new YoAPI($username, $password);
$yoAPI->set_nonblocking("TRUE");
$response = $yoAPI->ac_deposit_funds('256770000000', 10000, 'Reason for transfer of funds');
if($response['Status']=='OK'){
	// Transaction was successful and funds were deposited onto your account
	echo "Transaction Reference = ".$response['TransactionReference'];
}

```

Receive payment notification when payment completed.

```
$yoAPI = new YoAPI($username, $password);
if(isset($_POST)){
	$response = $yoAPI->receive_payment_notification();
	if($response['is_verified']){
		// Notification is from Yo! Uganda Limited
		echo "Payment from ".$response['msisdn']." on ".$response['date_time']." for ".$response['narrative']." with an amount of ".$response['amount'].". Mobile Network Reference = ".$response['network_ref']." and external reference of ".$response['external_ref'];
	}
}

```

Receive notification when payment has failed.

```
$yoAPI = new YoAPI($username, $password);
if(isset($_POST)){
	$response = $yoAPI->receive_payment_failure_notification();
	if($response['is_verified']){
		// Notification is from Yo! Uganda Limited
		echo "Payment on ".$response['transaction_init_date']." with a FAILED transaction status ".$response['failed_transaction_reference']." closed.";
	}
}

```

You'll find plenty more to play with in the [examples](https://github.com/YO-Uganda) folder.

That's it! You should now be ready to use YoAPI

Built With
----------

[](#built-with)

- [PHP](http://www.php.net/) - PHP Programming Language

Authors
-------

[](#authors)

- **Aziz Kirumira** - *Initial work* - [Yo (U) Ltd](https://github.com/YO-Uganda)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

Acknowledgments
---------------

[](#acknowledgments)

- Gerald Begumisa
- Grace Kyeyune
- Joseph Tabajjwa

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 55.9% 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 ~2524 days

Total

2

Last Release

655d ago

PHP version history (2 changes)1.0.0PHP ^5.3.3 || ^7.0

1.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1839eea78d214f3ca10f1fc5d665a85e227005a2c632a9972dc15683a8e547a6?d=identicon)[akirumira](/maintainers/akirumira)

---

Top Contributors

[![akirumira](https://avatars.githubusercontent.com/u/30139316?v=4)](https://github.com/akirumira "akirumira (19 commits)")[![josepht1](https://avatars.githubusercontent.com/u/8546798?v=4)](https://github.com/josepht1 "josepht1 (9 commits)")[![jtabajjwa](https://avatars.githubusercontent.com/u/3489796?v=4)](https://github.com/jtabajjwa "jtabajjwa (5 commits)")[![HopeMercy](https://avatars.githubusercontent.com/u/121169012?v=4)](https://github.com/HopeMercy "HopeMercy (1 commits)")

---

Tags

composerpackagemobile-moneyYoPayments

### Embed Badge

![Health badge](/badges/yo-uganda-yopaymentsphp8x/health.svg)

```
[![Health](https://phpackages.com/badges/yo-uganda-yopaymentsphp8x/health.svg)](https://phpackages.com/packages/yo-uganda-yopaymentsphp8x)
```

###  Alternatives

[yo-uganda/yopaymentsphp

A PHP Library to interact with the Yo! Payments API.

112.4k](/packages/yo-uganda-yopaymentsphp)[knplabs/packagist-api

Packagist API client.

1821.3M34](/packages/knplabs-packagist-api)[pear2/net_routeros

This package allows you to read and write information from a RouterOS host using MikroTik's RouterOS API.

248111.7k4](/packages/pear2-net-routeros)[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[foxrp/rippled-php

A PHP library for communication with rippled. (The XRP Ledger)

432.5k](/packages/foxrp-rippled-php)[private-packagist/api-client

Private Packagist API Client

3578.0k1](/packages/private-packagist-api-client)

PHPackages © 2026

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