Create invoice
Create an invoice with a hosted payment page. The same invoices appear in the Moolre dashboard. The API does not send the email, PDF or SMS that the dashboard sends: give the customer the payment_link.
Request History
Your request history will appear here.
Headers
Your Moolre username.
Your wallet private API key. A public key is refused.
Optional. 1 to 128 printable characters. Repeating a request with the same key and the same body returns the stored response with meta.replayed true for 24 hours; the same key with a different body returns IDEM01.
Body Params
Your Moolre wallet account number.
GHS or NGN. Must equal the wallet currency.
Required only when the wallet has several collection services. Otherwise the single service is used.
Title of the invoice, at most 100 characters.
The customer being invoiced. A customer with the same phone on the service is reused.
Show fields (3)Hide fields
customer.namestringrequired- At most 100 characters.
customer.phonestringrequired- 9 to 15 digits, optional leading +.
customer.emailstringoptional- Customer email address.
A single line for this amount. Send either amount or items.
Send either amount or items: 1 to 50 invoice lines, each an object with the fields below.
Show item fields (3)Hide item fields
items[].descriptionstringrequired- At most 200 characters.
items[].quantityintegeroptional- Whole number from 1 to 100000. Default 1.
items[].amountstringrequired- Unit price.
Percent, 0 to 100. Default 0. Total = subtotal x (1 + tax / 100), rounded to the cent.
YYYY-MM-DD (end of that day) or YYYY-MM-DD HH:MM:SS, UTC. Not in the past and within 2 years.
At most 500 characters. Defaults to invoice_name.
Your reference, at most 128 characters, unique per wallet. The same reference with the same body returns the original invoice (INV02); a different body is INV07.
Up to 2000 bytes of your own data, returned as given.
Responses
The invoice object. INV02 with data.replayed true is returned when the same reference and body are sent again.
{ "status": 1, "code": "INV01", "message": "Invoice created.", "data": { "invoiceid": "5-1", "status": "pending", "reference": "INV-1001", "invoice_name": "Term 1 fees", "currency": "GHS", "total": "100.00", "amount_paid": "0.00", "tax": "0", "items": [ { "amount": "50.00", "quantity": "2", "description": "Tuition" } ], "customer": { "name": "Ama Mensah", "phone": "0240000001", "email": "" }, "narration": "Term 1 fees", "due_date": "2026-12-31T23:59:59Z", "payment_link": "https://invoice.moolre.com/5-1", "payment_code": "*203*0621#", "metadata": null, "created": "2026-11-15T09:00:00Z" }, "go": null, "meta": { "requestid": "req_c68f4c66115c26725c796242", "notices": [] }}The reference was already used on this wallet for a different invoice.
{ "status": 0, "code": "INV07", "message": "reference was already used on this wallet for a different invoice.", "data": "reference", "go": null, "meta": { "requestid": "req_c68f4c66115c26725c796242", "notices": [] }}Fields every response can carry
On failures, read code, message and data (the first failing field). meta is always present and holds requestid (also the X-Request-Id header), notices and, only on idempotent replays, replayed. There is no outcome field: use status, code and data.txstatus. Send X-Moolre-Http-Status: strict to receive real HTTP status codes. See Responses and request IDs and Errors and status codes.
