PHPackages                             bmatovu/laravel-mtn-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. [API Development](/categories/api)
4. /
5. bmatovu/laravel-mtn-momo

ActiveLibrary[API Development](/categories/api)

bmatovu/laravel-mtn-momo
========================

Laravel MTN MOMO integration.

v4.4.0(1y ago)14310.9k↓26.3%51[11 issues](https://github.com/mtvbrianking/laravel-mtn-momo/issues)[2 PRs](https://github.com/mtvbrianking/laravel-mtn-momo/pulls)MITPHPPHP ^8.1CI passing

Since Mar 29Pushed 1y ago18 watchersCompare

[ Source](https://github.com/mtvbrianking/laravel-mtn-momo)[ Packagist](https://packagist.org/packages/bmatovu/laravel-mtn-momo)[ Docs](https://github.com/mtvbrianking/laravel-mtn-momo)[ RSS](/packages/bmatovu-laravel-mtn-momo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (37)Used By (0)

Laravel MTM MOMO API Integration
--------------------------------

[](#laravel-mtm-momo-api-integration)

[![Total Downloads](https://camo.githubusercontent.com/7d5ccce74cfb6b94c2036bf7c32f06448ec4584db4280f33bd1403cae9071508/68747470733a2f2f706f7365722e707567782e6f72672f626d61746f76752f6c61726176656c2d6d746e2d6d6f6d6f2f646f776e6c6f616473)](https://packagist.org/packages/bmatovu/laravel-mtn-momo)[![Latest Stable Version](https://camo.githubusercontent.com/c0688626675f0774fb41df5c353d25c3db96177c3c0c68a25b101822418494eb/68747470733a2f2f706f7365722e707567782e6f72672f626d61746f76752f6c61726176656c2d6d746e2d6d6f6d6f2f762f737461626c65)](https://packagist.org/packages/bmatovu/laravel-mtn-momo)[![License](https://camo.githubusercontent.com/c74f8daa745ac44c8df1bbc73cc30ce5c51d9a80d5301772b98d62576e3b6c57/68747470733a2f2f706f7365722e707567782e6f72672f626d61746f76752f6c61726176656c2d6d746e2d6d6f6d6f2f6c6963656e7365)](https://packagist.org/packages/bmatovu/laravel-mtn-momo)[![Code Quality](https://camo.githubusercontent.com/3d0bb85a8e0a61a56a8efe0fb044723aa104b033835215a54681a49fa9eb5a65/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d7476627269616e6b696e672f6c61726176656c2d6d746e2d6d6f6d6f2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mtvbrianking/laravel-mtn-momo/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/bb09dd9a0f391306eb318d740d8fef35426bfe5659c39b1679cd774509f6da30/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d7476627269616e6b696e672f6c61726176656c2d6d746e2d6d6f6d6f2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mtvbrianking/laravel-mtn-momo/?branch=master)[![Tests](https://github.com/mtvbrianking/laravel-mtn-momo/workflows/run-tests/badge.svg)](https://github.com/mtvbrianking/laravel-mtn-momo/actions?query=workflow:run-tests)[![Documentation](https://github.com/mtvbrianking/laravel-mtn-momo/workflows/gen-docs/badge.svg)](https://mtvbrianking.github.io/laravel-mtn-momo/master)

### Introduction

[](#introduction)

This package helps you integrate the [MTN MOMO API](https://momodeveloper.mtn.com) into your Laravel application. It provides a wrapper around the core MTN MOMO API services, leaving you to worry about other parts of your application.

### [Installation](https://packagist.org/packages/bmatovu/laravel-mtn-momo)

[](#installation)

To get started, install the package via the Composer package manager:

LaravelPackageInstallation^6.02.0`composer require bmatovu/laravel-mtn-momo ^2.0`^7.03.0`composer require bmatovu/laravel-mtn-momo ^3.0`^8.0 ... ^10.0master`composer require bmatovu/laravel-mtn-momo`**Configuration customization**

If you wish to customize the default configurations, you may export the default configuration using

```
php artisan vendor:publish --provider="Bmatovu\MtnMomo\MtnMomoServiceProvider" --tag="config"
```

**Database Migration**

The package service provider registers it's own database migrations with the framework, so you should migrate your database after installation. The migration will create a tokens tables your application needs to store access tokens from MTN MOMO API.

```
php artisan migrate
```

### Prerequisites

[](#prerequisites)

You will need the following to get started with you integration...

1. Create a [**developer account**](https://momodeveloper.mtn.com/signup) with MTN MOMO.
2. Subscribe to a [**product/service**](https://momodeveloper.mtn.com/products) that you wish to consume.

If you already subscribed to a product, the subscription key can be found in your [**profile**](https://momodeveloper.mtn.com/developer).

### Getting started (Sandbox)

[](#getting-started-sandbox)

Register your client details.

```
php artisan mtn-momo:init
```

Next you need to register your client app ID.

```
php artisan mtn-momo:register-id
```

You may want to verify your client ID at this stage

```
php artisan mtn-momo:validate-id
```

Then request for a client secret (key).

```
php artisan mtn-momo:request-secret
```

### Usage

[](#usage)

```
use Bmatovu\MtnMomo\Products\Collection;

$collection = new Collection();

$referenceId = $collection->requestToPay('yourTransactionId', '46733123454', 100);
```

See [test numbers](https://momodeveloper.mtn.com/api-documentation/testing/#test-numbers)

**Exception handling**

```
use Bmatovu\MtnMomo\Products\Collection;
use Bmatovu\MtnMomo\Exceptions\CollectionRequestException;

try {
    $collection = new Collection();

    $referenceId = $collection->requestToPay('yourTransactionId', '46733123453', 100);
} catch(CollectionRequestException $e) {
    do {
        printf("\n\r%s:%d %s (%d) [%s]\n\r",
            $e->getFile(), $e->getLine(), $e->getMessage(), $e->getCode(), get_class($e));
    } while($e = $e->getPrevious());
}
```

### [Available methods](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products.html)

[](#available-methods)

**Collection**

1. [Collect money](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Collection.html#method_requestToPay)

    ```
    $collection->requestToPay($yourTransactionId, $partyId, $amount)
    ```
2. [Check transaction status](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Collection.html#method_getTransactionStatus)

    ```
    $collection->getTransactionStatus($referenceId)
    ```
3. [Check account balance](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Collection.html#method_getAccountBalance)

    ```
    $collection->getAccountBalance()
    ```
4. [Check account status](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Collection.html#method_isActive)

    ```
    $collection->isActive($partyId)
    ```
5. [Get OAuth token](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Collection.html#method_getToken)

    ```
    $collection->getToken()
    ```
6. [Get Account Holder Info](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Collection.html#method_getAccountHolderBasicInfo)

    ```
    $collection->getAccountHolderBasicInfo($partyId)
    ```

**Disbursement**

1. [Disburse money](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Disbursement.html#method_transfer)

    ```
    $disbursement->transfer($yourTransactionId, $partyId, $amount)
    ```
2. [Check transaction status](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Disbursement.html#method_getTransactionStatus)

    ```
    $disbursement->getTransactionStatus($referenceId)
    ```
3. [Check account balance](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Disbursement.html#method_getAccountBalance)

    ```
    $disbursement->getAccountBalance()
    ```
4. [Check account status](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Disbursement.html#method_isActive)

    ```
    $disbursement->isActive($partyId)
    ```
5. [Get OAuth token](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Disbursement.html#method_getToken)

    ```
    $disbursement->getToken()
    ```
6. [Get Account Holder Info](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Collection.html#method_getAccountHolderBasicInfo)

    ```
    $disbursement->getAccountHolderBasicInfo($partyId)
    ```

**Remittance**

1. [Remit money](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Remittance.html#method_transact)

    ```
    $remittance->transfer($yourTransactionId, $partyId, $amount)
    ```
2. [Check transaction status](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Remittance.html#method_getTransactionStatus)

    ```
    $remittance->getTransactionStatus($referenceId)
    ```
3. [Check account balance](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Remittance.html#method_getAccountBalance)

    ```
    $remittance->getAccountBalance()
    ```
4. [Check account status](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Remittance.html#method_isActive)

    ```
    $remittance->isActive($partyId)
    ```
5. [Get OAuth token](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Remittance.html#method_getToken)

    ```
    $remittance->getToken()
    ```
6. [Get Account Holder Info](https://mtvbrianking.github.io/laravel-mtn-momo/master/Bmatovu/MtnMomo/Products/Collection.html#method_getAccountHolderBasicInfo)

    ```
    $remittance->getAccountHolderBasicInfo($partyId)
    ```

### Go live

[](#go-live)

You will need to make some changes to your setup before going live. [Read more](https://github.com/mtvbrianking/laravel-mtn-momo/wiki/Go-Live).

### Support Groups

[](#support-groups)

Join MTN's Skype &amp; WhatsApp support groups. [Here](https://momodeveloper.mtn.com/contact-support)

### Reporting bugs

[](#reporting-bugs)

If you've stumbled across a bug, please help us by leaving as much information about the bug as possible, e.g.

- Steps to reproduce
- Expected result
- Actual result

This will help us to fix the bug as quickly as possible, and if you wish to fix it yourself feel free to [fork the package](https://github.com/mtvbrianking/laravel-mtn-momo) and submit a pull request!

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance42

Moderate activity, may be stable

Popularity43

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 93.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 ~65 days

Recently: every ~265 days

Total

34

Last Release

452d ago

Major Versions

v1.8.0 → v2.0.02019-09-04

v2.0.3 → v3.0.02020-03-04

v3.0.1 → v4.0.02020-09-18

1.8.x-dev → 3.x-dev2021-02-27

2.0.x-dev → v4.1.02021-03-01

PHP version history (10 changes)v0.1.0PHP &gt;=5.6.4

v1.5.0PHP &gt;=7.0.0

v1.6.0PHP &gt;=7.1.3

v2.0.0PHP &gt;=7.2

v3.0.0PHP ^7.2.5

v4.0.0PHP ^7.3

v3.1.0PHP ^7.2.5|^8.0

2.0.x-devPHP &gt;=7.2|^8.0

v4.1.0PHP ^7.3|^8.0

v4.4.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0cc99b58d12a288f0fd19099cc3c724ff4df84d978df0e7451b650e8182bc919?d=identicon)[bmatovu](/maintainers/bmatovu)

---

Top Contributors

[![mtvbrianking](https://avatars.githubusercontent.com/u/5412360?v=4)](https://github.com/mtvbrianking "mtvbrianking (235 commits)")[![hamzamugabo](https://avatars.githubusercontent.com/u/51456444?v=4)](https://github.com/hamzamugabo "hamzamugabo (10 commits)")[![stevebaros](https://avatars.githubusercontent.com/u/11651953?v=4)](https://github.com/stevebaros "stevebaros (2 commits)")[![yondifon](https://avatars.githubusercontent.com/u/35140079?v=4)](https://github.com/yondifon "yondifon (1 commits)")[![MuluhGodson](https://avatars.githubusercontent.com/u/40151808?v=4)](https://github.com/MuluhGodson "MuluhGodson (1 commits)")[![alhaji-aki](https://avatars.githubusercontent.com/u/19788708?v=4)](https://github.com/alhaji-aki "alhaji-aki (1 commits)")[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (1 commits)")

---

Tags

apilaravelmobilemomomoneymtnpackageapilaravelpackagemtnmomo

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/bmatovu-laravel-mtn-momo/health.svg)

```
[![Health](https://phpackages.com/badges/bmatovu-laravel-mtn-momo/health.svg)](https://phpackages.com/packages/bmatovu-laravel-mtn-momo)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)

PHPackages © 2026

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