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

ActiveLibrary

yo-uganda-muokid3/yopaymentsphp
===============================

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

v1.0.2(5y ago)092MITPHPPHP ^5.3.3 || ^7.0

Since Aug 25Pushed 5y agoCompare

[ Source](https://github.com/muokid3/YoPaymentsPHP)[ Packagist](https://packagist.org/packages/yo-uganda-muokid3/yopaymentsphp)[ RSS](/packages/yo-uganda-muokid3-yopaymentsphp/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (3)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/yopaymentsphp) (using semantic versioning), so just add this line to your `composer.json` file

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

```

or

```
composer require yo-uganda/yopaymentsphp

```

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

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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.5% 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 ~1344 days

Total

2

Last Release

1838d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11188654?v=4)[Dennis Muoki](/maintainers/muokid3)[@muokid3](https://github.com/muokid3)

---

Top Contributors

[![akirumira](https://avatars.githubusercontent.com/u/30139316?v=4)](https://github.com/akirumira "akirumira (19 commits)")[![muokid3](https://avatars.githubusercontent.com/u/11188654?v=4)](https://github.com/muokid3 "muokid3 (2 commits)")

---

Tags

composerpackagemobile-moneyYoPayments

### Embed Badge

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

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

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M63](/packages/jean85-pretty-package-versions)[composer/satis

Simple Repository Generator

3.3k1.4M17](/packages/composer-satis)[codedungeon/phpunit-result-printer

PHPUnit Pretty Result Printer

1.2k8.8M397](/packages/codedungeon-phpunit-result-printer)[fxp/composer-asset-plugin

NPM/Bower Dependency Manager for Composer

8894.8M41](/packages/fxp-composer-asset-plugin)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)[consolidation/cgr

Safer alternative to 'composer global require'.

453213.9k](/packages/consolidation-cgr)

PHPackages © 2026

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