Initiate Payment API

Send a USSD payment request to a payer's phone number for approval.

Endpoint Information

POST https://api.moolre.com/open/transact/payment

To test in sandbox, use https://sandbox.moolre.com/open/transact/payment instead.

Authentication & Headers

Header NameTypeRequiredDescription
X-API-USERstringYesYour Moolre username.
X-API-PUBKEYstringYesYour Public API Key. (Not required in Sandbox)

Request Parameters

ParameterTypeRequiredDescription
typeintegerYesMust be 1.
channelstringYes13=MTN, 6=Telecel, 7=AT.
currencystringYesCurrency code (e.g., GHS).
payerstringYesCustomer's phone number.
amountstringYesAmount to collect.
externalrefstringYesUnique reference for the payment.
otpcodestringNoOTP code if required by the flow.
referencestringNoOptional payment reference.
sessionidstringNoUSSD session ID if applicable.
accountnumberstringYesYour Moolre Account Number.

Response Examples

200 (OTP Required) - OTP Required

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
}

200 (Payment Request) - Success

Payment request initiated successfully.

{
  "status": 1,
  "code": "TR099",
  "message": null,
  "data": "f25fc80e-791b-495b-8799-dcf87660457d",
  "go": null
}

400 - Duplicate Reference

The external reference must be unique.

{
  "status": "0",
  "code": "TP13",
  "message": "External Reference is required and must be unique.",
  "data": "externalref",
  "go": null
}

← Back to AI Documentation Index | View Full API Reference