PHPackages                             prinx/payswitch-momo - 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. prinx/payswitch-momo

ActiveLibrary

prinx/payswitch-momo
====================

Payswitch mobile money api utility class

v3.1.0(4y ago)134MITPHPPHP &gt;=5.6

Since Apr 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/prinx/payswitch-momo-php)[ Packagist](https://packagist.org/packages/prinx/payswitch-momo)[ RSS](/packages/prinx-payswitch-momo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (25)Used By (0)

PAYSWITCH MOBILE MONEY PHP SDK
==============================

[](#payswitch-mobile-money-php-sdk)

[![Build Status](https://camo.githubusercontent.com/c75f23d939c85633653dedf5cc33abf64c5a405f9625f51e98e1eb77d6df5a4c/68747470733a2f2f7472617669732d63692e636f6d2f7072696e782f7061797377697463682d6d6f6d6f2d7068702e7376673f6272616e63683d6d61696e)](https://travis-ci.com/prinx/payswitch-momo-php)[![Latest Stable Version](https://camo.githubusercontent.com/d5b5405c3d60f95344f89c6314b8b5083cd1cbff5159620e07303a6a052ce19b/68747470733a2f2f706f7365722e707567782e6f72672f7072696e782f7061797377697463682d6d6f6d6f2f762f737461626c652e737667)](https://packagist.org/packages/prinx/payswitch-momo)[![License](https://camo.githubusercontent.com/64b601c6e1b840a130063c8d0d8f8576efd49a934af8a0c61283c0d226793ea0/68747470733a2f2f706f7365722e707567782e6f72672f7072696e782f7061797377697463682d6d6f6d6f2f6c6963656e73652e737667)](https://packagist.org/packages/prinx/payswitch-momo)[![StyleCI](https://camo.githubusercontent.com/2b211bdd9f866e13be0f108e7ec276297035004d963627e534e3c09057d158e5/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3335393135323934312f736869656c643f7374796c653d666c6174266272616e63683d6d61696e)](https://github.styleci.io/repos/359152941?branch=main)

Work In Progress
----------------

[](#work-in-progress)

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

[](#installation)

```
composer require prinx/payswitch-momo
```

Usage
-----

[](#usage)

### Configuration in `.env` file (in the project root folder)

[](#configuration-in-env-file-in-the-project-root-folder)

```
# .env file

PAYSWITCH_MOMO_API_ENV=test|prod
PAYSWITCH_MOMO_API_USER=
PAYSWITCH_MOMO_API_KEY=
PAYSWITCH_MOMO_API_MERCHANT_ID=
PAYSWITCH_MOMO_API_PROCESSING_CODE="000200"
PAYSWITCH_MOMO_API_DESCRIPTION="At least 10 characters"

PAYSWITCH_MOMO_LOG_ENABLED=true|false
PAYSWITCH_MOMO_LOCAL_LOG_ENABLED=true|false
```

> Make sure the value for `PAYSWITCH_MOMO_API_PROCESSING_CODE` and `PAYSWITCH_MOMO_API_KEY` are enclosed with double quotes.

### Making a payment request

[](#making-a-payment-request)

```
use Prinx\Payswitch\MobileMoney;

$momo = new MobileMoney;

$amount = 1; // 1 cedi
$phone = '233...';
$network = ''; // Must be one of MTN|VODAFONE|AIRTEL

$response = $momo->pay($amount, $phone, $network);

if ($response->isSuccessful()) {
    // User successfully payed
} else {
    $error = $response->getError();
}
```

### Voucher code for Vodafone users

[](#voucher-code-for-vodafone-users)

*Vodafone* users always generate a voucher code to be able to process their mobile money transactions. After getting the voucher code from the user, you can easily pass it argument of the `pay` method:

```
// ...

$response = $momo->pay($amount, $phone, $network, $voucherCode);
```

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

24

Last Release

1817d ago

Major Versions

v0.0.4 → v1.0.02021-04-23

v1.2.0 → v2.0.02021-04-26

v2.0.3 → v3.0.02021-04-26

PHP version history (2 changes)v0.0.1PHP &gt;=5.6.0

v3.1.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/896d24b4882562faf6f1c8c25ea90e515037f5811f251a11fd80b68db61fc458?d=identicon)[Prinx](/maintainers/Prinx)

---

Top Contributors

[![prinx](https://avatars.githubusercontent.com/u/7337610?v=4)](https://github.com/prinx "prinx (46 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/prinx-payswitch-momo/health.svg)

```
[![Health](https://phpackages.com/badges/prinx-payswitch-momo/health.svg)](https://phpackages.com/packages/prinx-payswitch-momo)
```

PHPackages © 2026

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