Collect money
Invoices
An invoice says what a client owes and gives them a way to pay it. Each one has its own pay page, a PDF, and a balance that goes down as money arrives. When nothing is owed it becomes PAID by itself.
Use the /receivables paths
POST /receivables/invoices. Only invoices created there have a pay page, a PDF and credit notes.The invoice
{
"id": "7d0c4f3a-9a51-4d0b-b0d5-2f3f6c1c8e21",
"number": "INV-00042",
"status": "ISSUED",
"customerName": "Amina Wanjiru",
"customerEmail": "amina@example.com",
"customerPhone": "+254712345678",
"customerTaxPin": null,
"currency": "KES",
"totalMinor": 485000,
"paidMinor": 0,
"creditedMinor": 0,
"balanceMinor": 485000,
"createdAt": "2026-12-03T09:00:00.000Z",
"paidAt": null,
"dueDate": "2026-12-17",
"items": [
{
"description": "Consultation",
"quantity": 1,
"unitMinor": 150000,
"taxType": "B"
},
{
"description": "Lab tests",
"quantity": 2,
"unitMinor": 167500,
"taxType": "B"
}
],
"vat": {
"totalTax": 66897,
"lines": [
{
"type": "B",
"label": "VAT 16%",
"taxable": 485000,
"tax": 66897
}
]
},
"notes": null,
"sentAt": null,
"sendCount": 0,
"viewedAt": null,
"creditNote": null,
"partCredits": {
"notes": [],
"creditable": [
1,
2
]
},
"payUrl": "https://pay.example.co.ke/i/fQxPOppRTQuw1S8_bByOIQ.Zk3vN8qL2mXc7RtY5uWbA1dE"
}numberstring- Your next number in the series
INV-00001,INV-00002… statusstringISSUED(waiting for payment),PAIDorVOID(cancelled with a credit note).totalMinorinteger- The invoice total, VAT included.
paidMinorinteger- Confirmed payments so far.
creditedMinorinteger- Taken off by part credit notes.
balanceMinorinteger- What is still owed: total, less credits, less payments.
vatobject- The VAT inside the total, by tax type.
payUrlstring | null- The page your client pays on. Present only while the invoice is waiting for payment.
sentAt, sendCount, viewedAtmixed- When it was last emailed, how many times, and when the client first opened the pay page.
creditNoteobject | null- The credit note that cancelled it:
number,atandreason. partCreditsobjectnoteslists part credit notes;creditablegives, for each line in order, the quantity that can still be credited.
The list returns a shorter form of each invoice, without items, vat, notes, partCredits, customerPhone and payUrl. Read one invoice to get everything.
Endpoints
Create an invoice
/receivables/invoicesPermission invoices.create
The invoice is issued at once and an invoice.issued webhook is sent. Your client is not emailed until you send it.
Body
customerNamestringRequired- Who the invoice is for, 2 to 120 characters.
currencystringRequired- A three-letter code in capitals, such as
KES. itemsarrayRequired- 1 to 100 lines.
descriptionstringRequired- 1 to 200 characters.
quantityintegerRequired- At least 1.
unitMinorintegerRequired- The price of one unit in minor units, VAT included unless you say otherwise below.
taxTypestringOptional- The KRA tax type:
Aexempt,BVAT 16%,Czero-rated,Dnon-VAT,EVAT 8%. Left out, your organisation's default is used.
customerEmailstringOptional- Where the invoice can be sent.
customerPhonestringOptional- A phone number. Returned in international form.
customerTaxPinstringOptional- The client's KRA PIN, such as
A012345678Z. With it, the document is titled Tax invoice. dueDatestringOptional- The date payment is due, as
2026-12-17. notesstringOptional- Printed on the invoice, up to 1,000 characters.
pricesExcludeVatbooleanOptional- true means the prices you sent are before VAT; each is converted once to its VAT-inclusive price. Default:
false. replacesInvoiceIduuidOptional- An invoice of yours that was cancelled with a credit note and that this one corrects. The two are linked.
curl -X POST https://prod.pay.radingtechnologies.co.ke/receivables/invoices \
-H "Authorization: Bearer $RADIPAY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: job-2291-invoice" \
-d '{
"customerName": "Amina Wanjiru",
"customerEmail": "amina@example.com",
"currency": "KES",
"dueDate": "2026-12-17",
"items": [
{
"description": "Consultation",
"quantity": 1,
"unitMinor": 150000
},
{
"description": "Lab tests",
"quantity": 2,
"unitMinor": 167500
}
]
}'{
"data": {
"id": "7d0c4f3a-9a51-4d0b-b0d5-2f3f6c1c8e21",
"number": "INV-00042",
"status": "ISSUED",
"customerName": "Amina Wanjiru",
"customerEmail": "amina@example.com",
"customerPhone": "+254712345678",
"customerTaxPin": null,
"currency": "KES",
"totalMinor": 485000,
"paidMinor": 0,
"creditedMinor": 0,
"balanceMinor": 485000,
"createdAt": "2026-12-03T09:00:00.000Z",
"paidAt": null,
"dueDate": "2026-12-17",
"items": [
{
"description": "Consultation",
"quantity": 1,
"unitMinor": 150000,
"taxType": "B"
},
{
"description": "Lab tests",
"quantity": 2,
"unitMinor": 167500,
"taxType": "B"
}
],
"vat": {
"totalTax": 66897,
"lines": [
{
"type": "B",
"label": "VAT 16%",
"taxable": 485000,
"tax": 66897
}
]
},
"notes": null,
"sentAt": null,
"sendCount": 0,
"viewedAt": null,
"creditNote": null,
"partCredits": {
"notes": [],
"creditable": [
1,
2
]
},
"payUrl": "https://pay.example.co.ke/i/fQxPOppRTQuw1S8_bByOIQ.Zk3vN8qL2mXc7RtY5uWbA1dE"
}
}List invoices
/receivables/invoicesPermission invoices.read
Query
qstringOptional- Find by number or client name. Small typing mistakes are forgiven.
filter[status]stringOptional- One or more of
ISSUED,PAID,VOID, separated by commas. filter[createdAt]stringOptional- A range of dates:
2026-11-01..2026-11-30. Either side may be left empty. filter[totalMinor]stringOptional- A range of amounts in minor units:
100000..500000. sortstringOptionalcreatedAt,number,customerName,totalMinororstatus. Default:createdAt.orderstringOptionalascordesc. Default:desc.page, pageSizeintegerOptional- Paging. pageSize may be up to 200 here.
curl -G https://prod.pay.radingtechnologies.co.ke/receivables/invoices \
-H "Authorization: Bearer $RADIPAY_API_KEY" \
--data-urlencode "filter[status]=ISSUED" \
--data-urlencode "filter[createdAt]=2026-11-01..2026-11-30" \
--data-urlencode "sort=totalMinor"meta also carries the sort and order that were used.
Get one invoice
/receivables/invoices/{id}Permission invoices.read
curl https://prod.pay.radingtechnologies.co.ke/receivables/invoices/7d0c4f3a-9a51-4d0b-b0d5-2f3f6c1c8e21 \
-H "Authorization: Bearer $RADIPAY_API_KEY"Download the PDF
/receivables/invoices/{id}/documentPermission invoices.read
Returns the PDF itself, not JSON. Add ?inline=1 to have a browser show it instead of saving it. While the invoice is waiting for payment the PDF carries the pay address and a QR code; once part paid it shows what has been paid and the balance due.
curl https://prod.pay.radingtechnologies.co.ke/receivables/invoices/7d0c4f3a-9a51-4d0b-b0d5-2f3f6c1c8e21/document \
-H "Authorization: Bearer $RADIPAY_API_KEY" \
-o INV-00042.pdfEmail the invoice
/receivables/invoices/{id}/sendPermission invoices.createUp to 30 a minute
Body
tostringRequired- The client’s email address.
ccstring[]Optional- Up to 10 more addresses.
subjectstringOptional- Your own subject line, up to 200 characters.
messagestringOptional- Your own words above the invoice, up to 2,000 characters.
attachPdfbooleanOptional- Attach the PDF. Default:
true.
The email carries the pay button. The answer is the invoice plus delivery: sent or queued.
curl -X POST https://prod.pay.radingtechnologies.co.ke/receivables/invoices/7d0c4f3a-9a51-4d0b-b0d5-2f3f6c1c8e21/send \
-H "Authorization: Bearer $RADIPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "amina@example.com"
}'Cancel with a credit note
/receivables/invoices/{id}/credit-notePermission invoices.voidUp to 20 a minute
Cancels an invoice on which nothing has been paid. It becomes VOID, a numbered credit note (CN-00001…) is issued, and its pay address stops working. Doing it twice changes nothing. An invoice with money on it cannot be cancelled: refund the payment, or credit the part still owed.
Body
reasonstringRequired- Why, in 5 to 300 characters. Printed on the credit note.
curl -X POST https://prod.pay.radingtechnologies.co.ke/receivables/invoices/7d0c4f3a-9a51-4d0b-b0d5-2f3f6c1c8e21/credit-note \
-H "Authorization: Bearer $RADIPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Issued to the wrong client"
}'Credit part of an invoice
/receivables/invoices/{id}/credit-notesPermission invoices.voidUp to 20 a minute
Takes some lines, or some of a line's quantity, off an invoice that is waiting for payment. The credit is always at the invoiced price. The balance goes down; if that clears a part-paid invoice it becomes PAID.
Body
reasonstringRequired- Why, in 5 to 300 characters.
linesarrayRequired- What to credit. Each invoice line may appear once.
indexintegerRequired- Which invoice line, counting from 0.
quantitynumberRequired- How much of it. No more than is left for that line in
partCredits.creditable.
curl -X POST https://prod.pay.radingtechnologies.co.ke/receivables/invoices/7d0c4f3a-9a51-4d0b-b0d5-2f3f6c1c8e21/credit-notes \
-H "Authorization: Bearer $RADIPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "One lab test was not done",
"lines": [
{
"index": 1,
"quantity": 1
}
]
}'Not available while KRA eTIMS is switched on
PART_CREDIT_NEEDS_ETIMS. Cancel the invoice with a credit note and issue a corrected one using replacesInvoiceId.Replace the pay address
/receivables/invoices/{id}/revoke-linkPermission invoices.void
Every copy of the invoice's pay address stops working and the answer carries a new payUrl. Use it if the address went to the wrong person.
How an invoice gets paid
- On its pay page. The client opens
payUrland pays the balance by M-Pesa, card or bank. The money lands in your wallet. - In parts. Each confirmed payment sends payment.succeeded with
subjectTypeinvoiceand lowersbalanceMinor. The invoice staysISSUEDuntil nothing is owed. - In full. When the balance reaches zero the invoice becomes
PAIDand invoice.paid is sent.
Errors
| Code | Status | Meaning |
|---|---|---|
VALIDATION_FAILED | 400 | A field is missing or wrong. details.fields says which, for example items.0.quantity. |
INVOICE_PART_PAID | 422 | Money has been paid on it, so it cannot be cancelled. Refund the payment or credit the part still owed. |
INVOICE_VOID | 422 | A cancelled invoice cannot be sent. |
INVOICE_NOT_SENT | 422 | The email could not be sent, or that address has asked not to receive email. |
ETIMS_PENDING | 422 | KRA has not signed the invoice yet. It is retried automatically; send it once signed. |
INVOICE_NOT_CREDITABLE | 422 | Only an invoice waiting for payment can be part credited. |
CREDIT_QUANTITY_TOO_LARGE | 422 | More than is left to credit on that line. |
CREDIT_TOO_LARGE | 422 | The credit is more than what is still owed. |
CREDIT_IS_CANCELLATION | 422 | This would credit the whole invoice. Cancel it with a credit note instead. |
NOT_CREDITED | 422 | Issue a credit note for the old invoice before replacing it. |
ALREADY_REPLACED | 422 | That invoice has already been replaced. |
DOCUMENTS_BUSY | 502 | The PDF could not be made just now. Try again in a moment. |