Skip to content

Data

POST
/open/sales/data

Send a data bundle to a recipient on MTN, Telecel, or AT, paid from the wallet identified by accountnumber. Choose a bundle that Bundles lists for the selected network. Its price is the amount charged; do not send amount. 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

Data 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 data bundle.

bundle string required

Bundle ID returned by Bundles for the selected channel network. The bundle price determines the charge. Look up bundle IDs.

currency string required

Sale currency. Must be GHS.

accountnumber string required

Moolre wallet account number that pays for the data bundle. 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 data bundle 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
Bundle amount in GHS, determined by the selected bundle price.
gonull

Data application codes

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

Data 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.Data requests do not send amount. Check bundle selection and contact support if this shared Sales code persists.
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.
ASL14Bundle missing.Provide a bundle ID returned by Bundles for the selected network.
ASL15Bundle not sold on this network.Use a bundle ID that Bundles lists for the selected channel network.

View Errors and status codes for the shared response envelope.

Language

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

Response

Body

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