Skip to content

Generate Payment Link

POST
/embed/link

The Payment link system is used to generate a URL that opens a Moolre Web POS page for collecting payments. It can embedded into a website or presented to a customer via a redirect for payment.

Moolre Dashboard Security Tab

Snapshot of the Moolre Web POS page

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.

amountrequired

Amount to be paid.

currencyrequired

Currency of your account/wallet.

accountnumberrequired

Your Moolre Account Number.

emailrequired

Email of the business.

externalrefrequired

Unique ID to identify the payment.

callback (Optional)

Callback URL for payment notifications.

redirect (Optional)

Redirect URL after successful payment.

reusablerequired

Whether the link can be used for repeat payments.

  • 0No: one payment.
  • 1Yes: repeat payments.
expiration_time (Optional)

Link expiry time in minutes. Leave blank to omit it from the request.

METADATA (OPTIONAL)

Pass any data you want to be returned to you.

Responses

RESPONSE BODY
statusinteger
codestring
messagestring
dataobject
authorization_urlstring
referencestring
The request failed, possibly due to a non-unique `externalref`.

Language

curl --request POST \     --url 'https://api.moolre.com/embed/link' \     --header 'X-API-USER: Your Username' \     --header 'X-API-PUBKEY: YOUR_PUBLIC_KEY' \     --header 'Content-Type: application/json' \     --data '{  "type": 1,  "amount": "",  "email": "",  "externalref": "",  "reusable": "0",  "currency": "GHS",  "accountnumber": ""}'

Response

Body

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