PHPackages                             linlak/momoapi - 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. linlak/momoapi

ActiveLibrary[API Development](/categories/api)

linlak/momoapi
==============

Momo php library is small php package that helps developers to integrate the momo api their project (s).

v1.0.1(7y ago)135[1 issues](https://github.com/linlak/momoapi/issues)1MITPHPPHP &gt;=5.4

Since Mar 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/linlak/momoapi)[ Packagist](https://packagist.org/packages/linlak/momoapi)[ RSS](/packages/linlak-momoapi/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (3)Used By (1)

Momo PHP Api Version 1.0
========================

[](#momo-php-api-version-10)

This is a php library that has been designed to help developers to easily integrate the **momo api** into their system.

Solution
--------

[](#solution)

After finding out that most developers were having trouble integrating the momoapi into there system. We came up with this simple php library to make the integration easy and fast.

Prerequisites
-------------

[](#prerequisites)

Before you start using this library we assume that you have good knowledge of php, composer and namespace autoloading. And have installed all the required software to enable run the examples provided here.

You must also have an account on the Momo Developer Portal [https://momodeveloper.mtn.com/](https://momodeveloper.mtn.com/ "Visit page")

**Software**

The following software is require for better results:-

- Testing server with **PHP** and **MYSQL** support e.g xampp,lampp,wampp etc.
- Composer a dependency manager for php. [https://getcomposer.org/](https://getcomposer.org/ "Go to docs")
- Text editor
    - Sublime text
    - NotePad ++
    - Visual code etc.
- A web browser e.g google chrome, mozilla etc.

**Features**

- This library depends on guzzlehttp to perform http requests.
- ApiUsers, accessTokens, apiKeys are stored in the database and all of this is done the first time a product is initailized.
- AccessTokens are refreshed once they approach expiration. We have all of this for you.

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

[](#installation)

Use composer to manage your dependencies and download Momo Api Library:

```
composer require linlak/momoapi

```

Examples
--------

[](#examples)

**Creating ApiUser** [https://momodeveloper.mtn.com/docs/services/sandbox-provisioning-api](https://momodeveloper.mtn.com/docs/services/sandbox-provisioning-api "Read More")

The following code snippet will help to create an **apiUser** this supports all products these include:

- Collection [https://momodeveloper.mtn.com/docs/services/collection](https://momodeveloper.mtn.com/docs/services/collection "Read More")
- Remittances [https://momodeveloper.mtn.com/docs/services/remittance](https://momodeveloper.mtn.com/docs/services/remittance "Read More")
- Disbursements [https://momodeveloper.mtn.com/docs/services/disbursement](https://momodeveloper.mtn.com/docs/services/disbursement "Read More")

**Note:**

> Whenever we show text in curry brackets ("{text}") please replace that text with the required data without brackets.

Let's start by bootstrapping our momo library in the code snippet bellow.

\*\*Note: \*\* The apiUser is generated automatically

***momo\_bootstrap.php***

```
