Discover our new campaign management platform. Learn more



1 Scope

LAMAIRTIME is a proxy / API for sending airtime (phone credit) to numbers subscribed to your service, using an API interface.
LAMAIRTIME offers two interfaces :
- via Web: the user connects via a browser
- via API: the client's application exchanges information automatically with the LAfricaMobile platform
This document describes the second way and explains how to use this API.

2 Account settings
2.1 Prerequisites

To use this API, you need a valid account. When creating your account, LAfricaMobile must give you:
- a login (also called accountid) ( also named accountid)
- a password
- an amount
- a phone
- an operator
- callback
This username / password pair is used as an identification parameter in the API.

2.2 Variables used in the documentation

In this document, we use values below. The real values will be given to you by our technical team or by your own configuration (for parameters depending on your side, callback for example). Some of them may not be used depending on your needs.
Document test values :
- login=fred
- password=xpasswordx
- montant=100
- telephone = 221773758085
- operateur = ORANGESN
- callback = https://votreentreprise.com/reception
- AIRTIME Server url : https://mtpremium-prod.lafricamobile.com

You should replace these values with your own settings during your tests.

3 Send credit
3.1 How send via http

Instead of having all parameters encapsulated, you can directly GET parameters individually :

Parameters are :

Name Mandatory Sample value Comment
login Y fred Value given by LAM
password Y xpasswordx Value given by LAM
montant Y 100 Amount to send
operateur Y ORANGESN Operator code
telephone Y 221773758085 User phone number
callback N https://votreentreprise.com/reception the acknowledgment url

So you can make a call directly in your browser. Here is an example of request :

3.2 How to send via PHP code

Here is an example with the PHP script :


Content-Type: application/json

tatus":"PENDING","transaction_date":"2020/04/02 10:56:44

4 Real-time acknowledgment

In this case, our server calls an url when it detects that its status needs to change.
This url must be provided in the parameter named callback

This callback is called with these parameters in an HTTP JSON request.