Skip to content
Pay
Esc
↑↓navigate↵open⌘Jpreview

Create an invoice

Send a bill the customer pays later from any MoMo channel. Needs the collect permission.

POST/invoices

When it’s paid, RazPay adds a collection to the ledger with the same external_reference and sends invoice.paid. See Invoices.

external_referencebodystringrequired

Your unique reference for this invoice. It can’t already be used by a transaction. Retrying with it returns the original invoice.

providerbodystringrequired
Default: momo

Provider to issue it through.

amountbodynumberrequired

Amount due, in major units.

currencybodystringrequired
Default: SZL

ISO 4217 code.

phone_numberbodystringrequired

Who should pay it.

descriptionbodystring

Shown to the payer. Up to 160 characters.

validity_secondsbodyintegerrequired

How long it can be paid.

metadatabodyobject

Your own data. Copied onto the collection when the invoice is paid.

The invoice object

external_referencestringrequired

Your reference.

provider_idstringrequired

The provider.

provider_refstringrequired

The reference RazPay gave the provider.

provider_invoice_idstring

The provider’s own invoice id, once assigned.

payment_referencestring

The provider’s payment reference for the payer, once assigned.

amountnumberrequired

Amount due.

currencystringrequired

ISO 4217 code.

payer_phonestringrequired

Who should pay it, canonical form.

descriptionstring

As sent.

validity_secondsintegerrequired

As sent.

statusstringrequired

pending, paid, failed, cancelled or expired.

failure_reasonstring

Why it failed.

expires_atinteger

Unix time (seconds) it stops being payable.

metadataobjectrequired

Your own data.

created_atintegerrequired

Unix time (seconds) it was created.

updated_atintegerrequired

Unix time (seconds) of its last change.

Request
curl -X POST 'https://api.razpay.razonetix.com/v1/invoices' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "external_reference": "fees-term2-0042",
  "provider": "momo",
  "amount": "1500.00",
  "currency": "SZL",
  "phone_number": "76123456",
  "description": "Term 2 school fees",
  "validity_seconds": "1209600"
}'
{
  "success": true,
  "message": "invoice created",
  "data": {
    "external_reference": "fees-term2-0042",
    "provider_id": "momo",
    "provider_ref": "5d1e7a2b-9c3f-4e6a-8b0d-2f4c6e8a0b1d",
    "amount": 1500,
    "currency": "SZL",
    "payer_phone": "26876123456",
    "description": "Term 2 school fees",
    "validity_seconds": 1209600,
    "status": "pending",
    "expires_at": 1761984000,
    "metadata": {},
    "created_at": 1760774400,
    "updated_at": 1760774400
  }
}

Was this page helpful?