Generate Payment Link API

Create a hosted payment page URL. The Payment link system is used to generate a URL that opens a Moolre Web POS page for collecting payments.

Endpoint Information

POST https://api.moolre.com/embed/link

To test in sandbox, use https://sandbox.moolre.com/embed/link 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.
amountstringYesAmount to be paid.
emailstringYesEmail of the business.
externalrefstringYesUnique ID to identify the payment.
callbackstringYesCallback URL for payment notifications.
redirectstringYesRedirect URL after successful payment.
reusablestringYesDetermines if the link can be used for repeat payments. 0=No, 1=Yes.
currencystringYesCurrency of your account/wallet.
accountnumberstringYesYour Moolre Account Number.
metadataobjectNoOptional metadata to be returned in callbacks.

Response Examples

200 - Success

Link generated successfully.

{
  "status": 1,
  "code": "POS09",
  "message": "POS payment link successfully generated.",
  "data": {
    "authorization_url": "https://pos.moolre.com/RZWs1yB6amGjNoiEQvlHPS5uqgp3Jc",
    "reference": "uuid-1234as2"
  }
}

400 - Duplicate Transaction

Transaction already exists with this reference.

{
  "status": 0,
  "code": "INP02",
  "message": "Transaction already exits!",
  "data": []
}

← Back to AI Documentation Index | View Full API Reference