A credit note reduces the value of one issued invoice, in full or for chosen lines. It carries VAT line by line, gets its own number (CN-0001, CN-0002 and so on), and cannot be edited or deleted once issued. Credit notes are created and issued in a single call: there are no draft credit notes.
What a credit note does to the books: it adds a credit_note row to the client's payment ledger and settles the invoice by up to what the invoice still owes. Anything beyond that (for example when the invoice was already paid) stays on the client's account as credit, to be used on a later invoice or paid back and recorded as a refund. When credit notes cover the whole invoice its status becomes credited.
Credit note object
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier |
| public_id | string | Short ID used in the public credit note link |
| number | string | Sequential credit note number, e.g. CN-0001. Its own sequence, separate from your invoice numbers |
| status | string | issued. The only status for now |
| invoice_id | string | The invoice this credit note reduces |
| invoice_number | string | That invoice's number, as it was when the credit note was issued |
| invoice_date | timestamp | That invoice's date, as it was when the credit note was issued |
| client_id | string | ID of the invoice's client |
| owner_user_id | string | The team member who issued it |
| currency | string | ISO 4217 code. Always the invoice's currency |
| vat_enabled | boolean | Copied from the invoice |
| prices_include_vat | boolean | Copied from the invoice: whether line prices include VAT |
| credit_date | timestamp | The date printed on the credit note |
| reason | string | Why the credit was issued. Printed on the credit note |
| items | array | Credited lines, in the same shape as invoice line items (see Line item object in the Invoices API) |
| discount_type | string | fixed or percentage, or omitted. A full credit note copies the invoice's document discount as it is; a partial credit note always carries a percentage discount (the invoice's discount as an effective percentage) |
| discount_value | integer | Cents for a fixed discount, basis points for a percentage discount |
| discount_amount | integer | Calculated discount in cents |
| amount | integer | Total credited including VAT, in cents |
| notes | string | Notes printed on the credit note |
| issued | timestamp | When the credit note was issued |
| created | timestamp | When the record was created |
| totals | object | Calculated figures: lines, groups (base and VAT per VAT type and rate), subtotal, vat and total |
Issue a credit note
POST /invoice/:id/credit_note
Issues a credit note against an invoice that has been sent. Draft, scheduled, cancelled and fully credited invoices cannot be credited.
| Field | Required | Type | Description |
|---|---|---|---|
| reason | Yes | string | Why the credit is being issued, max 500 characters. Printed on the credit note |
| credit_date | No | date | YYYY-MM-DD. Defaults to today in your account timezone. Must fall between the invoice date and today |
| full | No | boolean | true credits everything still creditable, and items is then ignored. On an invoice with no credit note yet it credits every line, with the document discount. After partial credit notes it credits exactly what is left: one "Balance of invoice #N" line per VAT type and rate, priced at the amount excl. VAT left there with a vat_amount of the VAT left there (no discount), so the invoice ends fully credited, value and VAT, to the cent |
| items | When full is false | array | Lines to credit, in the same shape as invoice line items. Each needs a positive quantity and price, and a VAT type and rate that is on the invoice |
| notes | No | string | Notes to print on the credit note |
| send_email | No | boolean | Email the credit note to the client once issued. A failed send does not undo the credit note |
curl -X POST https://api.rebill.co.za/invoice/abc123/credit_note \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"reason": "Event cancelled by the client",
"full": true,
"send_email": true
}'To credit only part of an invoice, leave full out and list the lines:
curl -X POST https://api.rebill.co.za/invoice/abc123/credit_note \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"reason": "Two hours were not worked",
"credit_date": "2026-10-27",
"items": [
{
"type": "service",
"name": "Consulting",
"quantity": 2,
"unit_price": 100000,
"vat_type": "standard",
"vat_rate": 1500
}
]
}'Response (201 Created):
{
"credit_note": {
"id": "cn_001",
"number": "CN-0001",
"status": "issued",
"invoice_id": "abc123",
"invoice_number": "INV0001",
"currency": "ZAR",
"credit_date": "2026-10-27T00:00:00Z",
"reason": "Two hours were not worked",
"amount": 230000,
"items": [...],
"totals": {...}
},
"invoice": {
"id": "abc123",
"status": "paid",
"amount": 575000,
"amount_due": 0,
"credited_amount": 230000,
"credit_applied_amount": 0
},
"leftover_credit": 230000
}| Response field | Type | Description |
|---|---|---|
| credit_note | object | The issued credit note |
| invoice | object | The invoice as it is now, with its new status and credit figures |
| leftover_credit | integer | Cents of this credit note the invoice could not absorb because it was already paid. This stays on the client's account as credit. 0 when the invoice took all of it |
Credit limits and errors
A credit note can never reverse more than the invoice charged. The total credited across all credit notes cannot exceed the invoice total. For each VAT type and rate, the credit notes together cannot take more than the invoice charged at that rate, in value, in the amount excl. VAT, or in VAT: a credit note never reverses more VAT than the invoice charged at each rate. Each partial credit note rounds its own VAT, so lines credited one at a time drift from the invoice by a few cents. Two cases make a partial credit note credit exactly what is left at a rate instead. First, its lines at that rate take every invoice line still open there, in full quantity and at the invoice price (lines are matched by item_id, else by name, and together must be worth at least open_lines_value less a cent per open line, before the document discount and VAT included), and its value is within close_tolerance_all_lines cents of what is left: crediting the last lines at a rate always closes it. That allowance is a few cents, larger only on invoices with a fixed discount: that discount reaches each partial credit note as a rounded percentage, and the allowance grows by exactly the difference this makes at that rate, plus a cent. Second, for any other lines, its value is within close_tolerance cents of what is left, at most 5 cents, so a typed amount is never moved by more than that. Its lines at that rate then become one line (keeping the line's name when there was one, else "Balance of invoice #N") with the amount excl. VAT and the vat_amount left. Both figures are in List credit notes for an invoice. full: true credits everything left exactly, value and VAT, and always passes these limits. If the invoice has a document discount, a first full credit note copies it, and a partial credit note applies it as an effective percentage, so a line credited at full price is credited at what the client actually paid for it.
A refused issue returns 422 Unprocessable with a message:
| Message | Cause |
|---|---|
| Only sent or paid invoices that aren't fully credited can be credited. | The invoice is a draft, scheduled, cancelled or already fully credited |
| This credit is more than what's left to credit on the invoice. | The credit note would take the invoice over its total |
| This credit is more than what's left to credit at that VAT rate. | More value than is left at one VAT type and rate |
| This credit reverses more VAT than is left at that rate. Use Credit everything that's left instead. | The value fits, but by rounding the credit takes more VAT, or more excl. VAT, than is left at one VAT type and rate. Issue with full: true to credit what is left exactly |
| vat_amount can't be set. | A line in items has a vat_amount: only Rebill sets it |
| Every line must use a VAT rate that is on the invoice. | A line uses a VAT type or rate the invoice does not have |
| The credit date must be between the invoice date and today. | credit_date is before the invoice date or in the future |
| Add at least one line to credit. | full is false and items is empty |
| Each line needs a positive quantity and price. | A line has a zero or negative quantity or price |
| Add a reason for the credit. | reason is blank |
What a credit note changes on the invoice
The invoice's credited_amount grows by the credit note amount, and credit_applied_amount grows by the part the invoice absorbed (up to its amount_due at the time). The status is derived again:
| Case | Result |
|---|---|
| Unpaid R1 000, credit R1 000 | credited, owes R0 |
| Unpaid R1 000, credit R200 | sent, owes R800 |
| Unpaid R1 000, credit R200, then R800 paid | paid |
| Paid R1 000, credit R200 | Stays paid; R200 becomes client credit |
| Paid R1 000, credit R1 000 | credited; R1 000 becomes client credit |
Cash paid on an invoice is amount - amount_due - credit_applied_amount. A credit note is never counted as a payment received.
An invoice with a credit note cannot be cancelled, has its amounts, lines, number, client and date locked, stops accruing late fees, and its payments cannot be removed. Credit the remaining balance instead.
List credit notes for an invoice
GET /invoice/:id/credit_note
Returns the credit notes issued against one invoice, plus what is still left to credit. Use it to prefill a form for the next partial credit note.
curl https://api.rebill.co.za/invoice/abc123/credit_note \ -H "Authorization: Bearer sk_your_secret_key"
Response:
{
"credit_notes": [...],
"remaining": 345000,
"remaining_by_group": [
{
"vat_type": "standard",
"vat_rate": 1500,
"remaining": 345000,
"remaining_base": 300000,
"remaining_vat": 45000,
"close_tolerance": 1,
"close_tolerance_all_lines": 2,
"open_lines": [
{ "name": "Consulting", "quantity": 3 }
],
"open_lines_value": 345000
}
],
"remainder_lines": [...],
"partial_discount": { "type": "", "value": 0 }
}| Response field | Type | Description |
|---|---|---|
| credit_notes | array | Credit notes on this invoice |
| remaining | integer | Cents still available to credit, including VAT |
| remaining_by_group | array | remaining split by VAT type and rate: vat_type, vat_rate (basis points), remaining, and that split into remaining_base (excl. VAT) and remaining_vat. A credit with full: true credits exactly these figures. open_lines are the invoice lines at that rate not yet credited in full (item_id when set, name and the quantity left). open_lines_value is what they are worth at their invoice prices, before the document discount, VAT included. A partial credit whose lines at that rate take all of them in full, worth at least open_lines_value less a cent per open line, credits exactly what is left there when its value is within close_tolerance_all_lines cents of remaining; any other partial credit does so within close_tolerance cents (at most 5) |
| remainder_lines | array | Line items that prefill a credit note for everything that is left |
| partial_discount | object | The document discount a partial credit note on this invoice carries, as type and value (basis points) |
List credit notes
GET /credit_note
Returns your credit notes, oldest credit date first.
| Query parameter | Type | Description |
|---|---|---|
| client_id | string | Only this client's credit notes |
| invoice_id | string | Only credit notes on this invoice |
| from | date | Credit date on or after this day (YYYY-MM-DD) |
| to | date | Credit date on or before this day (YYYY-MM-DD) |
curl "https://api.rebill.co.za/credit_note?from=2026-10-01&to=2026-10-31" \ -H "Authorization: Bearer sk_your_secret_key"
Response:
{
"credit_notes": [...]
}Get a credit note
GET /credit_note/:id
Returns one credit note object.
curl https://api.rebill.co.za/credit_note/cn_001 \ -H "Authorization: Bearer sk_your_secret_key"
Download the PDF
GET /credit_note/:id/pdf
Returns the credit note as a PDF, using your invoice template, logo and colours. The document is titled TAX CREDIT NOTE when your account has a VAT number, otherwise CREDIT NOTE. It shows the credit note number and date, your details and the client's, the credited lines with VAT, the reason, and the invoice it refers to. It has no bank details, payment link or due date, because a credit note asks for no payment.
curl https://api.rebill.co.za/credit_note/cn_001/pdf \ -H "Authorization: Bearer sk_your_secret_key" \ -o CreditNote-CN-0001.pdf
Email a credit note
POST /credit_note/:id/send_email
Emails the credit note to the client, with a link to the online copy and, if your account attaches PDFs to emails, the PDF. Call it again to resend. Returns 422 Unprocessable with "Client has no email address" when the client has no email. Every send is recorded in the delivery log.
curl -X POST https://api.rebill.co.za/credit_note/cn_001/send_email \ -H "Authorization: Bearer sk_your_secret_key"
List notifications for a credit note
GET /credit_note/:id/notification
Returns the delivery history of the emails sent for this credit note, in the same notifications and delivery shape as invoice notifications.
Public credit note links
GET /p/cn/:public_id GET /p/cn/:public_id/pdf
The unauthenticated endpoints behind the link in the credit note email. They take the credit note's public_id, return a limited view with no internal IDs, and need no API key. If the client has a document password, add ?pw= with that password; without it the response is 401.
Webhooks
Issuing a credit note emits credit_note.issued (resource ID: the credit note) and invoice.updated. When the invoice reaches credited it also emits invoice.credited, and when the credit note settles the last cents of an invoice it emits invoice.paid. A credit note is not money received, so it never emits payment.received or invoice.payment_received. See Webhooks.