Create an invoice
Send a bill the customer pays later from any MoMo channel. Needs the collect permission.
/invoicesWhen it’s paid, RazPay adds a collection to the ledger with the same external_reference and sends invoice.paid. See Invoices.
external_referencebodystringrequiredYour unique reference for this invoice. It can’t already be used by a transaction. Retrying with it returns the original invoice.
providerbodystringrequiredmomoProvider to issue it through.
amountbodynumberrequiredAmount due, in major units.
currencybodystringrequiredSZLISO 4217 code.
phone_numberbodystringrequiredWho should pay it.
descriptionbodystringShown to the payer. Up to 160 characters.
validity_secondsbodyintegerrequiredHow long it can be paid.
metadatabodyobjectYour own data. Copied onto the collection when the invoice is paid.
The invoice object
external_referencestringrequiredYour reference.
provider_idstringrequiredThe provider.
provider_refstringrequiredThe reference RazPay gave the provider.
provider_invoice_idstringThe provider’s own invoice id, once assigned.
payment_referencestringThe provider’s payment reference for the payer, once assigned.
amountnumberrequiredAmount due.
currencystringrequiredISO 4217 code.
payer_phonestringrequiredWho should pay it, canonical form.
descriptionstringAs sent.
validity_secondsintegerrequiredAs sent.
statusstringrequiredpending, paid, failed, cancelled or expired.
failure_reasonstringWhy it failed.
expires_atintegerUnix time (seconds) it stops being payable.
metadataobjectrequiredYour own data.
created_atintegerrequiredUnix time (seconds) it was created.
updated_atintegerrequiredUnix time (seconds) of its last change.
