API Reference

Invoices

Create, list, send, and mark invoices as paid via the Rebill API. Includes the full invoice object schema, line item structure, and payment recording endpoints.

Invoices are the core resource in Rebill. Each invoice belongs to a client, contains one or more line items, and progresses through a status lifecycle from draft to paid.

Invoice statuses: draft · scheduled · sent · paid · paid_partial · cancelled

List invoices

GET /invoice

Returns invoices for your account. By default, only active invoices (draft, sent, paid_partial) are included.

Query parameterTypeDescription
include_paidbooleanInclude paid invoices (default: false)
include_cancelledbooleanInclude cancelled invoices (default: false)
curl "https://rebill-api-896466068278.africa-south1.run.app/invoice?include_paid=true" \
  -H "Authorization: Bearer sk_your_secret_key"

Response:

{
  "invoices": [
    {
      "id": "abc123",
      "number": "INV0001",
      "status": "sent",
      "client_id": "xyz789",
      "currency": "ZAR",
      "invoice_date": "2026-03-01T00:00:00Z",
      "due_date": "2026-03-15T00:00:00Z",
      "amount_due": 150000,
      "items": [...]
    }
  ]
}

Get an invoice

GET /invoice/:id
curl https://rebill-api-896466068278.africa-south1.run.app/invoice/abc123 \
  -H "Authorization: Bearer sk_your_secret_key"

Invoice object

FieldTypeDescription
idstringUnique identifier
public_idstringShort ID used in public-facing payment links
createdtimestampWhen the invoice was created
numberstringHuman-readable invoice number (e.g. INV0001)
currencystringISO 4217 currency code
statusstringdraft · scheduled · sent · paid · paid_partial · cancelled
client_idstringID of the client this invoice belongs to
invoice_datetimestampInvoice issue date
due_datetimestampPayment due date
amount_dueintegerOutstanding balance in cents
itemsarrayLine items (see Line item object)
notesstringNotes printed on the invoice
bank_detailsstringBank account details for EFT payment
deposit_typestringfixed or percentage (if applicable)
deposit_valueintegerCents (fixed) or basis points (percentage)
deposit_amountintegerCalculated deposit amount in cents
custom_fieldsobjectKey-value pairs of custom fields
vat_enabledbooleanWhether VAT is shown on the invoice
scheduled_send_attimestampWhen the invoice is scheduled to be sent (only present on scheduled invoices)

Line item object

FieldTypeDescription
typestringproduct · service · discount
namestringLine item name
descriptionstringDescription printed on the invoice
quantityintegerNumber of units
unit_priceintegerPrice per unit in cents
vat_typestringinclusive · exclusive · none
vat_rateintegerVAT rate in basis points (1500 = 15%)

Discount items: set type to discount, unit_price to a negative value (e.g. -5000 for a R50 discount), quantity to 1, and vat_type to none.

Create an invoice

POST /invoice
FieldRequiredTypeDescription
client_idYesstringID of an existing client
invoice_dateYesdateInvoice issue date
due_dateYesdatePayment due date
itemsYesarrayAt least one line item
currencyNostringISO 4217 code; defaults to your account currency
notesNostringNotes to print on the invoice
bank_detailsNostringBank account details for EFT
deposit_typeNostringfixed or percentage
deposit_valueNointegerCents (fixed) or basis points (percentage)
custom_fieldsNoobjectAdditional key-value fields to display
scheduled_send_atNotimestampISO 8601 UTC datetime to schedule automatic email delivery (e.g. 2026-04-01T07:00:00Z). Creates the invoice with status scheduled instead of draft.
curl -X POST https://rebill-api-896466068278.africa-south1.run.app/invoice \
  -H "Authorization: Bearer sk_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "xyz789",
    "invoice_date": "2026-03-15",
    "due_date": "2026-03-30",
    "currency": "ZAR",
    "items": [
      {
        "type": "service",
        "name": "Web design",
        "description": "Homepage redesign",
        "quantity": 1,
        "unit_price": 500000,
        "vat_type": "exclusive",
        "vat_rate": 1500
      }
    ],
    "notes": "Payment due within 30 days."
  }'

Response (201 Created):

{
  "id": "abc123"
}

If scheduled_send_at is provided, the invoice is created with status scheduled and will be emailed automatically at the specified time. Otherwise it is created as draft. Fetch it by ID to get the full object including the assigned invoice number.

Update an invoice

PUT /invoice/:id

Updates an existing invoice. Accepts the same fields as create. Only draft invoices can be edited.

Delete an invoice

DELETE /invoice/:id

Permanently deletes an invoice. Only draft invoices can be deleted.

Mark an invoice as sent

POST /invoice/:id/mark_as_sent

Marks a draft invoice as sent without sending any email or WhatsApp message. Useful when you have delivered the invoice through another channel and just want to update its status.

curl -X POST https://rebill-api-896466068278.africa-south1.run.app/invoice/abc123/mark_as_sent \
  -H "Authorization: Bearer sk_your_secret_key"

Send an invoice

POST /invoice/:id/send

Sends the invoice to the client and marks it as sent. Works on draft and scheduled invoices. By default sends via email. Add ?whatsapp=true to send via WhatsApp instead (requires a WhatsApp-enabled account and sufficient credits).

# Send via email
curl -X POST https://rebill-api-896466068278.africa-south1.run.app/invoice/abc123/send \
  -H "Authorization: Bearer sk_your_secret_key"

# Send via WhatsApp
curl -X POST "https://rebill-api-896466068278.africa-south1.run.app/invoice/abc123/send?whatsapp=true" \
  -H "Authorization: Bearer sk_your_secret_key"

Cancel a scheduled invoice

POST /invoice/:id/cancel_schedule

Cancels the scheduled delivery of a scheduled invoice and reverts it to draft status. The invoice is not sent and can be edited, rescheduled, or sent manually.

curl -X POST https://rebill-api-896466068278.africa-south1.run.app/invoice/abc123/cancel_schedule \
  -H "Authorization: Bearer sk_your_secret_key"

Response (200 OK):

{
  "id": "abc123"
}

Mark an invoice as paid

POST /invoice/:id/mark_as_paid

Records a manual payment against the invoice and marks it as paid. A payment receipt email is sent to the client automatically.

FieldRequiredTypeDescription
receivedYesdateDate the payment was received (YYYY-MM-DD)
methodYesstringPayment method (e.g. eft, cash, card, cheque)
referenceNostringPayment reference or transaction ID
curl -X POST https://rebill-api-896466068278.africa-south1.run.app/invoice/abc123/mark_as_paid \
  -H "Authorization: Bearer sk_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "received": "2026-03-20",
    "method": "eft",
    "reference": "REF123456"
  }'

Partially paid invoices

Invoices with an existing online payment record (status paid_partial) cannot use this endpoint. Use POST /invoice/:id/capture_payment instead to record additional payments against them.

Was this article helpful?