laravel-mtn-momo maintained by bmatovu
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.5
- ramsey/uuid ^4.7
- php ^8.1
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/container ^10.0|^11.0|^12.0
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/database ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- nesbot/carbon ^2.3|^3.0
- php ^8.1
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.5
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/container ^10.0|^11.0|^12.0
- illuminate/contracts ^10.0|^11.0|^12.0
- illuminate/database ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- nesbot/carbon ^2.3|^3.0
- ramsey/uuid ^4.7
- php ^7.3|^8.0
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.5
- illuminate/console ^8.0|^9.0|^10.0
- illuminate/container ^8.0|^9.0|^10.0
- illuminate/contracts ^8.0|^9.0|^10.0
- illuminate/database ^8.0|^9.0|^10.0
- illuminate/support ^8.0|^9.0|^10.0
- nesbot/carbon ^2.62.1
- ramsey/uuid ^4.7
- php ^7.3|^8.0
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.5
- illuminate/console ^8.0|^9.0|^10.0
- illuminate/container ^8.0|^9.0|^10.0
- illuminate/contracts ^8.0|^9.0|^10.0
- illuminate/database ^8.0|^9.0|^10.0
- illuminate/support ^8.0|^9.0|^10.0
- nesbot/carbon ^2.62.1
- ramsey/uuid ^4.7
- php ^7.3|^8.0
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.5
- illuminate/console ^8.0|^9.0|^10.0
- illuminate/container ^8.0|^9.0|^10.0
- illuminate/contracts ^8.0|^9.0|^10.0
- illuminate/database ^8.0|^9.0|^10.0
- illuminate/support ^8.0|^9.0|^10.0
- nesbot/carbon ^2.62.1
- ramsey/uuid ^4.7
- php ^7.3|^8.0
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.0
- illuminate/console ^8.0|^9.0
- illuminate/container ^8.0|^9.0
- illuminate/contracts ^8.0|^9.0
- illuminate/database ^8.0|^9.0
- illuminate/support ^8.0|^9.0
- nesbot/carbon ^2.53.1
- ramsey/uuid ^4.2.2
- php ^7.3|^8.0
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.0
- illuminate/console ^8.0|^9.0
- illuminate/container ^8.0|^9.0
- illuminate/contracts ^8.0|^9.0
- illuminate/database ^8.0|^9.0
- illuminate/support ^8.0|^9.0
- nesbot/carbon ^2.53.1
- ramsey/uuid ^4.2.2
- php ^7.3|^8.0
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.0
- illuminate/console ^8.0|^9.0
- illuminate/container ^8.0|^9.0
- illuminate/contracts ^8.0|^9.0
- illuminate/database ^8.0|^9.0
- illuminate/support ^8.0|^9.0
- nesbot/carbon ^2.53.1
- ramsey/uuid ^4.2.2
- php ^7.3|^8.0
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.0
- illuminate/console ^8.0
- illuminate/container ^8.0
- illuminate/contracts ^8.0
- illuminate/database ^8.0
- illuminate/support ^8.0
- nesbot/carbon ^2.17
- ramsey/uuid ^4.0
- ext-json *
- guzzlehttp/guzzle ^6.3
- illuminate/console ^6.0
- illuminate/container ^6.0
- illuminate/contracts ^6.0
- illuminate/database ^6.0
- illuminate/support ^6.0
- nesbot/carbon ^2.0
- ramsey/uuid ^3.7
- php >=7.2|^8.0
- bmatovu/oauth-negotiator ^1.1
- ext-json *
- nesbot/carbon ^2.17
- guzzlehttp/guzzle ^6.3|^7.0
- illuminate/console ^7.0
- illuminate/container ^7.0
- illuminate/contracts ^7.0
- illuminate/database ^7.0
- illuminate/support ^7.0
- ramsey/uuid ^3.7|^4.0
- php ^7.2.5|^8.0
- bmatovu/oauth-negotiator ^1.1
- php >=7.1.3
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.8.0
- illuminate/container ~5.8.0
- illuminate/contracts ~5.8.0
- illuminate/database ~5.8.0
- illuminate/support ~5.8.0
- nesbot/carbon ^1.26.3||^2.0
- ramsey/uuid ~3.0
- php >=7.1.3
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.7.0
- illuminate/container ~5.7.0
- illuminate/contracts ~5.7.0
- illuminate/database ~5.7.0
- illuminate/support ~5.7.0
- nesbot/carbon ^1.26.3||^2.0
- ramsey/uuid ~3.0
- php >=7.1.3
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.6.0
- illuminate/container ~5.6.0
- illuminate/contracts ~5.6.0
- illuminate/database ~5.6.0
- illuminate/support ~5.6.0
- ramsey/uuid ~3.0
- nesbot/carbon 1.25.*||^2.0
- php >=7.0.0
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.5.0
- illuminate/container ~5.5.0
- illuminate/contracts ~5.5.0
- illuminate/database ~5.5.0
- illuminate/support ~5.5.0
- nesbot/carbon ^1.26.0||^2.0
- ramsey/uuid ~3.0
- php >=5.6.4
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.4.0
- illuminate/container ~5.4.0
- illuminate/contracts ~5.4.0
- illuminate/database ~5.4.0
- illuminate/support ~5.4.0
- nesbot/carbon ~1.20||^2.0
- ramsey/uuid ~3.0
- php >=5.6.4
- ext-json *
- guzzlehttp/guzzle ^6.3
- ramsey/uuid ~3.0
- illuminate/console ~5.3.0
- illuminate/container ~5.3.0
- illuminate/contracts ~5.3.0
- illuminate/database ~5.3.0
- illuminate/support ~5.3.0
- nesbot/carbon ~1.20||^2.0
- bmatovu/oauth-negotiator ~1.0.0
- php ^7.2.5|^8.0
- ext-json *
- bmatovu/oauth-negotiator ^1.1
- guzzlehttp/guzzle ^6.3|^7.0
- illuminate/console ^7.0
- illuminate/container ^7.0
- illuminate/contracts ^7.0
- illuminate/database ^7.0
- illuminate/support ^7.0
- nesbot/carbon ^2.17
- ramsey/uuid ^3.7|^4.0
- php ^7.3
- ext-json *
- bmatovu/oauth-negotiator ^2.0
- guzzlehttp/guzzle ^7.0.1
- illuminate/console ^8.0
- illuminate/container ^8.0
- illuminate/contracts ^8.0
- illuminate/database ^8.0
- illuminate/support ^8.0
- nesbot/carbon ^2.17
- ramsey/uuid ^4.0
- php ^7.2.5
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3|^7.0
- illuminate/console ^7.0
- illuminate/container ^7.0
- illuminate/contracts ^7.0
- illuminate/database ^7.0
- illuminate/support ^7.0
- nesbot/carbon ^2.17
- ramsey/uuid ^3.7|^4.0
- php ^7.2.5
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3|^7.0
- illuminate/console ^7.0
- illuminate/container ^7.0
- illuminate/contracts ^7.0
- illuminate/database ^7.0
- illuminate/support ^7.0
- nesbot/carbon ^2.17
- ramsey/uuid ^3.7
- php >=7.2
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ^6.0
- illuminate/container ^6.0
- illuminate/contracts ^6.0
- illuminate/database ^6.0
- illuminate/support ^6.0
- nesbot/carbon ^2.0
- ramsey/uuid ^3.7
- php >=7.2
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ^6.0
- illuminate/container ^6.0
- illuminate/contracts ^6.0
- illuminate/database ^6.0
- illuminate/support ^6.0
- nesbot/carbon ^2.0
- ramsey/uuid ^3.7
- php >=7.2
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ^6.0
- illuminate/container ^6.0
- illuminate/contracts ^6.0
- illuminate/database ^6.0
- illuminate/support ^6.0
- nesbot/carbon ^2.0
- ramsey/uuid ^3.7
- php >=7.2
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ^6.0
- illuminate/container ^6.0
- illuminate/contracts ^6.0
- illuminate/database ^6.0
- illuminate/support ^6.0
- nesbot/carbon ^2.0
- ramsey/uuid ^3.7
- php >=7.1.3
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.8.0
- illuminate/container ~5.8.0
- illuminate/contracts ~5.8.0
- illuminate/database ~5.8.0
- illuminate/support ~5.8.0
- nesbot/carbon ^1.26.3||^2.0
- ramsey/uuid ~3.0
- php >=7.1.3
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.7.0
- illuminate/container ~5.7.0
- illuminate/contracts ~5.7.0
- illuminate/database ~5.7.0
- illuminate/support ~5.7.0
- nesbot/carbon ^1.26.3||^2.0
- ramsey/uuid ~3.0
- php >=7.1.3
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.6.0
- illuminate/container ~5.6.0
- illuminate/contracts ~5.6.0
- illuminate/database ~5.6.0
- illuminate/support ~5.6.0
- nesbot/carbon 1.25.*||^2.0
- ramsey/uuid ~3.0
- php >=7.0.0
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.5.0
- illuminate/container ~5.5.0
- illuminate/contracts ~5.5.0
- illuminate/database ~5.5.0
- illuminate/support ~5.5.0
- nesbot/carbon ^1.26.0||^2.0
- ramsey/uuid ~3.0
- php >=5.6.4
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.4.0
- illuminate/container ~5.4.0
- illuminate/contracts ~5.4.0
- illuminate/database ~5.4.0
- illuminate/support ~5.4.0
- nesbot/carbon ~1.20||^2.0
- ramsey/uuid ~3.0
- php >=5.6.4
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.3.0
- illuminate/container ~5.3.0
- illuminate/contracts ~5.3.0
- illuminate/database ~5.3.0
- illuminate/support ~5.3.0
- nesbot/carbon ~1.20||^2.0
- ramsey/uuid ~3.0
- php >=5.6.4
- ext-json *
- guzzlehttp/guzzle ^6.3
- ramsey/uuid ~3.0
- bmatovu/oauth-negotiator ~1.0.0
- illuminate/console ~5.3.0
- illuminate/container ~5.3.0
- illuminate/contracts ~5.3.0
- illuminate/database ~5.3.0
- illuminate/support ~5.3.0
- nesbot/carbon ~1.20||^2.0
- php >=5.6.4
- ext-json *
- bmatovu/oauth-negotiator ~1.0.0
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.3.0
- illuminate/container ~5.3.0
- illuminate/contracts ~5.3.0
- illuminate/database ~5.3.0
- illuminate/support ~5.3.0
- nesbot/carbon ~1.20||^2.0
- ramsey/uuid ~3.0
- php >=5.6.4
- ext-json *
- bmatovu/oauth-negotiator ~0.0.2
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/container ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/contracts ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/database ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/support ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- nesbot/carbon ~1.20||^2.0
- ramsey/uuid ~3.0
- php >=5.6.4
- ext-json *
- bmatovu/oauth-negotiator ~0.0.2
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/container ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/contracts ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/database ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/support ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- nesbot/carbon ~1.20||^2.0
- ramsey/uuid ~3.0
- php >=5.6.4
- ext-json *
- bmatovu/oauth-negotiator ^0.0.1
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/container ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/contracts ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/database ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/support ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- nesbot/carbon ~1.20
- ramsey/uuid ~3.0
- php >=5.6.4
- ext-json *
- bmatovu/oauth-negotiator ^0.0.1
- guzzlehttp/guzzle ^6.3
- illuminate/console ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/container ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/contracts ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/database ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/support ~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0
- nesbot/carbon ~1.20
- ramsey/uuid ~3.0
Laravel MTM MOMO API Integration
Introduction
This package helps you integrate the MTN MOMO API 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
To get started, install the package via the Composer package manager:
| Laravel | Package | Installation |
|---|---|---|
| ^6.0 | 2.0 | composer require bmatovu/laravel-mtn-momo ^2.0 |
| ^7.0 | 3.0 | composer require bmatovu/laravel-mtn-momo ^3.0 |
| ^8.0 ... ^10.0 | master | 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
You will need the following to get started with you integration...
- Create a developer account with MTN MOMO.
- Subscribe to a product/service that you wish to consume.
If you already subscribed to a product, the subscription key can be found in your profile.
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
use Bmatovu\MtnMomo\Products\Collection;
$collection = new Collection();
$referenceId = $collection->requestToPay('yourTransactionId', '46733123454', 100);
See 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
Collection
-
$collection->requestToPay($yourTransactionId, $partyId, $amount) -
$collection->getTransactionStatus($referenceId) -
$collection->getAccountBalance() -
$collection->isActive($partyId) -
$collection->getToken() -
$collection->getAccountHolderBasicInfo($partyId)
Disbursement
-
$disbursement->transfer($yourTransactionId, $partyId, $amount) -
$disbursement->getTransactionStatus($referenceId) -
$disbursement->getAccountBalance() -
$disbursement->isActive($partyId) -
$disbursement->getToken() -
$disbursement->getAccountHolderBasicInfo($partyId)
Remittance
-
$remittance->transfer($yourTransactionId, $partyId, $amount) -
$remittance->getTransactionStatus($referenceId) -
$remittance->getAccountBalance() -
$remittance->isActive($partyId) -
$remittance->getToken() -
$remittance->getAccountHolderBasicInfo($partyId)
Go live
You will need to make some changes to your setup before going live. Read more.
Support Groups
Join MTN's Skype & WhatsApp support groups. Here
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 and submit a pull request!

