Skip to content

Mobile Money Collection

POST
/open/transact/payment

This endpoint allows you to initiate a payment by sending a USSD payment request to a payer's/customer's phone number for approval.

history

Request History

Your request history will appear here.

Headers

X-API-USER stringrequired

This is your Moolre username.

X-API-PUBKEY stringrequired

This is your Public API Key Generated from your Account.

Body Params

typerequired

ID of the function. Must be 1.

channelrequired

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

  • MTNMTN Mobile Money (deprecated id 13).
  • TELECELTelecel Cash (deprecated id 6).
  • ATAT Money (deprecated id 7).
currencyrequired

Currency for the payment.

payerrequired

Mobile Money number of the payer/customer.

amountrequired

Amount to be paid.

externalrefrequired

Unique ID to identify the payment.

otpcode (Optional)

One-Time Password sent to the payer.

reference (Optional)

Reference message for the payment.

sessionid (Optional)

Session ID from a USSD transaction to skip OTP.

accountnumberrequired

Your Moolre Account Number.

Responses

An OTP has been sent to the customer. Resubmit the request with the OTP.
Phone number verification was successful. You can now re-initiate the request to trigger the payment prompt.
The payment prompt has been sent to the customer for approval.
The provided OTP code is invalid.
The `externalref` provided is not unique and has been used before.

Language

curl --request POST \     --url 'https://api.moolre.com/open/transact/payment' \     --header 'X-API-USER: Your Username' \     --header 'X-API-PUBKEY: YOUR_PUBLIC_KEY' \     --header 'Content-Type: application/json' \     --data '{  "type": 1,  "channel": "MTN",  "currency": "GHS",  "payer": "",  "amount": "",  "externalref": "",  "otpcode": "",  "reference": "",  "sessionid": "",  "accountnumber": ""}'

Response

Body

{  "status": "0",  "code": "TP13",  "message": "External Reference is required and must be unique.",  "data": "externalref",  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}