Send a USSD payment request to a payer's phone number for approval.
POST https://api.moolre.com/open/transact/payment
To test in sandbox, use https://sandbox.moolre.com/open/transact/payment instead.
| Header Name | Type | Required | Description |
|---|---|---|---|
X-API-USER | string | Yes | Your Moolre username. |
X-API-PUBKEY | string | Yes | Your Public API Key. (Not required in Sandbox) |
| Parameter | Type | Required | Description |
|---|---|---|---|
type | integer | Yes | Must be 1. |
channel | string | Yes | 13=MTN, 6=Telecel, 7=AT. |
currency | string | Yes | Currency code (e.g., GHS). |
payer | string | Yes | Customer's phone number. |
amount | string | Yes | Amount to collect. |
externalref | string | Yes | Unique reference for the payment. |
otpcode | string | No | OTP code if required by the flow. |
reference | string | No | Optional payment reference. |
sessionid | string | No | USSD session ID if applicable. |
accountnumber | string | Yes | Your Moolre Account Number. |
Payment requires phone number verification.
{
"status": 1,
"code": "TP14",
"message": "Please complete the verification process sent to you via SMS and try again.",
"data": "all",
"go": null
}
Payment request initiated successfully.
{
"status": 1,
"code": "TR099",
"message": null,
"data": "f25fc80e-791b-495b-8799-dcf87660457d",
"go": null
}
The external reference must be unique.
{
"status": "0",
"code": "TP13",
"message": "External Reference is required and must be unique.",
"data": "externalref",
"go": null
}