Skip to content

Airtime

POST
/open/sales/airtime

Send airtime to a recipient on MTN, Telecel, or AT, paid from the wallet identified by accountnumber. The amount is in Ghana cedis (GHS) and must be at least 1.00. Use a unique external reference per wallet for each new sale.

Live requests make a real purchase.

ASL11 means in progress, not delivered. Check Sales Status before retrying. Read the Sales guide for setup, pricing, and handling pending sales.

history

Request History

Your request history will appear here.

Headers

X-API-USER required

Your Moolre username.

X-API-KEY required

Your Private API Key for the paying wallet.

Body Params

type integer required

Airtime sale function. Must be 1.

channel string required

Recipient network. Send the channel name (case-insensitive). The numeric ids still work but are deprecated and return a notice.

  • MTNMTN Mobile Money (deprecated id 1).
  • TELECELTelecel Cash (deprecated id 6).
  • ATAT Money (deprecated id 7).
receiver string required

Phone number receiving the airtime.

amount string required

Airtime amount in GHS. Minimum 1.00.

currency string required

Sale currency. Must be GHS.

accountnumber string required

Moolre wallet account number that pays for the airtime. Must be linked to your Sell on Our Platform Service.

externalref string required

Unique reference per wallet for this sale. The API also accepts extid as an alternative field name; send only one. Examples and this form use externalref.

reference string (optional)

Optional narration for the sale.

Responses

The sale is in progress. This example is not confirmation of airtime delivery.

statusstring
1 in the pending example; not proof of delivery.
codestring
ASL11: sale in progress.
messagestring
dataobject
txstatusinteger
0: pending in this example.
receiverstring
Recipient phone number.
transactionidstring
Pending in this example.
externalrefstring
Original sale reference.
amountstring
Airtime amount in GHS.
gonull

Airtime application codes

Application codes, not HTTP status codes. Do not assume delivery for any code not listed here.

Airtime application codes
CodeMeaningNext step
ASL11Sale in progress; no final reply yet.Check the sale status before treating the top-up as complete or submitting again.
ASL00Authentication error.Check the API user and private API key for the wallet.
ASL01Amount missing or below GHS 1.00.Provide an amount of at least GHS 1.00.
ASL02Receiver missing.Provide the recipient phone number.
ASL03Incomplete request.Check all required request fields.
ASL04Channel not supported.Use MTN, TELECEL, or AT, or the corresponding legacy value 1, 6, or 7.
ASL05Type invalid.Send type 1.
ASL06Unknown error; the sale may still have gone through.Confirm the sale status before any retry. Do not generate a new reference to resubmit an uncertain sale.
ASL08External reference missing or already used.Use a unique reference per wallet for a new sale. Check the original sale before attempting a duplicate.
ASL09Currency is not GHS.Send currency GHS.
ASL10Wallet currency not supported.Use a wallet with a supported currency for this GHS sale.
ASL12Wallet inactive.Check the wallet activation state.
ASL13Account number not found.Check the paying wallet account number.

View Errors and status codes for the shared response envelope.

Language

curl --request POST \     --url 'https://api.moolre.com/open/sales/airtime' \     --header 'X-API-USER: Your Username' \     --header 'X-API-KEY: YOUR_API_KEY' \     --header 'Content-Type: application/json' \     --data '{  "type": 1,  "channel": "MTN",  "receiver": "",  "amount": "1.00",  "currency": "GHS",  "accountnumber": "",  "externalref": "",  "reference": "Airtime top-up"}'

Response

Body

{  "status": "1",  "code": "ASL11",  "message": "Airtime sale in progress, please check its status.",  "data": {    "txstatus": 0,    "receiver": "233240000000",    "transactionid": "Pending",    "externalref": "your-extid",    "amount": "1.00"  },  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}