Invoices
Raise, amend, send and cancel invoices. Invoices move through the statuses `DRAFT`, `SCHEDULED`, `UNPAID`, `OVERDUE`, `PARTIALLY_PAID`, `PAID` and `CANCELLED`.
/invoicesReturns invoices newest first, using cursor pagination. Keep following
next_cursor until has_more is false.
Authorization
accountKey An account API key, in the form ct_live_ followed by 32 characters.
Generate one in the Chargetree dashboard under Settings → API. The
plaintext key is shown only once.
Send it as Authorization: Bearer ct_live_....
In: header
Query Parameters
Filter by status. Accepts a single status or a comma-separated list,
for example UNPAID,OVERDUE.
Only invoices belonging to this contact.
uuidExact match on the invoice number.
Only invoices dated on or after this day.
dateOnly invoices dated on or before this day.
dateHow many invoices to return. Values above 100 are capped at 100.
1 <= value <= 10025The next_cursor value from the previous page.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/invoices?status=UNPAID%2COVERDUE"{ "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invoice_number": "string", "status": "DRAFT", "is_draft": true, "contact": null, "invoice_date": "2019-08-24", "due_date": "2019-08-24", "currency": "string", "line_amount_types": "string", "sub_total": 0, "tax_total": 0, "total": 0, "amount_paid": 0, "amount_due": 0, "line_items": [ { "id": "string", "description": "string", "quantity": 0, "unit_amount": 0, "tax_rate": 0, "tax_amount": 0, "line_amount": 0 } ], "payments": [ { "id": "string", "amount": 0, "currency": "string", "received_at": "2019-08-24T14:15:22Z", "method": "string", "reference": "string", "recorded_by": "user" } ], "reference": "string", "notes": "string", "staff": "string", "is_editable": true, "sent_to_contact": true, "last_sent_at": "2019-08-24T14:15:22Z", "send_count": 0, "pay_url": "string", "xero_invoice_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "has_more": true}/invoicesCreates an invoice and, optionally, emails it to the contact straight away.
This endpoint honours the Idempotency-Key header, so a retried call
after a dropped connection will not raise a second invoice.
Authorization
accountKey An account API key, in the form ct_live_ followed by 32 characters.
Generate one in the Chargetree dashboard under Settings → API. The
plaintext key is shown only once.
Send it as Authorization: Bearer ct_live_....
In: header
Header Parameters
A unique value of your choosing, typically a UUID, that lets you retry this request safely. Replaying the same key with the same body returns the original response instead of acting twice.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/invoices" \ -H "Idempotency-Key: 0f2a5f1e-9f1a-4e0c-9a4e-2a9b7d1f6c33" \ -H "Content-Type: application/json" \ -d '{ "contact": { "email": "ap@acme.example" }, "invoice_date": "2026-07-01", "due_date": "2026-07-31", "line_items": [ { "description": "Onsite EV charger installation", "quantity": 1, "unit_amount": 1850, "tax_rate": 10, "tax_type": "OUTPUT" } ], "send_invoice": true }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invoice_number": "string", "status": "DRAFT", "is_draft": true, "contact": null, "invoice_date": "2019-08-24", "due_date": "2019-08-24", "currency": "string", "line_amount_types": "string", "sub_total": 0, "tax_total": 0, "total": 0, "amount_paid": 0, "amount_due": 0, "line_items": [ { "id": "string", "description": "string", "quantity": 0, "unit_amount": 0, "tax_rate": 0, "tax_amount": 0, "line_amount": 0 } ], "payments": [ { "id": "string", "amount": 0, "currency": "string", "received_at": "2019-08-24T14:15:22Z", "method": "string", "reference": "string", "recorded_by": "user" } ], "reference": "string", "notes": "string", "staff": "string", "is_editable": true, "sent_to_contact": true, "last_sent_at": "2019-08-24T14:15:22Z", "send_count": 0, "pay_url": "string", "xero_invoice_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}/invoices/{id}Returns a single invoice, including its line items and any payments recorded against it.
Authorization
accountKey An account API key, in the form ct_live_ followed by 32 characters.
Generate one in the Chargetree dashboard under Settings → API. The
plaintext key is shown only once.
Send it as Authorization: Bearer ct_live_....
In: header
Path Parameters
The invoice's Chargetree identifier.
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invoice_number": "string", "status": "DRAFT", "is_draft": true, "contact": null, "invoice_date": "2019-08-24", "due_date": "2019-08-24", "currency": "string", "line_amount_types": "string", "sub_total": 0, "tax_total": 0, "total": 0, "amount_paid": 0, "amount_due": 0, "line_items": [ { "id": "string", "description": "string", "quantity": 0, "unit_amount": 0, "tax_rate": 0, "tax_amount": 0, "line_amount": 0 } ], "payments": [ { "id": "string", "amount": 0, "currency": "string", "received_at": "2019-08-24T14:15:22Z", "method": "string", "reference": "string", "recorded_by": "user" } ], "reference": "string", "notes": "string", "staff": "string", "is_editable": true, "sent_to_contact": true, "last_sent_at": "2019-08-24T14:15:22Z", "send_count": 0, "pay_url": "string", "xero_invoice_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}/invoices/{id}Amends an invoice. Only the fields you send are changed.
Sending line_items replaces every existing line, so include the
full set, not just the ones that changed.
Invoices that have been paid or cancelled are locked and return
INVOICE_LOCKED.
Authorization
accountKey An account API key, in the form ct_live_ followed by 32 characters.
Generate one in the Chargetree dashboard under Settings → API. The
plaintext key is shown only once.
Send it as Authorization: Bearer ct_live_....
In: header
Path Parameters
The invoice's Chargetree identifier.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Only the fields you send are changed.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invoice_number": "string", "status": "DRAFT", "is_draft": true, "contact": null, "invoice_date": "2019-08-24", "due_date": "2019-08-24", "currency": "string", "line_amount_types": "string", "sub_total": 0, "tax_total": 0, "total": 0, "amount_paid": 0, "amount_due": 0, "line_items": [ { "id": "string", "description": "string", "quantity": 0, "unit_amount": 0, "tax_rate": 0, "tax_amount": 0, "line_amount": 0 } ], "payments": [ { "id": "string", "amount": 0, "currency": "string", "received_at": "2019-08-24T14:15:22Z", "method": "string", "reference": "string", "recorded_by": "user" } ], "reference": "string", "notes": "string", "staff": "string", "is_editable": true, "sent_to_contact": true, "last_sent_at": "2019-08-24T14:15:22Z", "send_count": 0, "pay_url": "string", "xero_invoice_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}/invoices/{id}/cancelSoft-cancels the invoice: the status becomes CANCELLED and the amount
due is set to zero. Nothing is deleted, so the invoice stays readable.
If the invoice was synced to Xero, Chargetree also tries to void it there. The cancellation in Chargetree succeeds either way.
Invoices that are already paid cannot be cancelled.
Note this endpoint does not honour Idempotency-Key; the header is
ignored. Cancelling twice is harmless, as the second call simply reports
the invoice is no longer cancellable.
Authorization
accountKey An account API key, in the form ct_live_ followed by 32 characters.
Generate one in the Chargetree dashboard under Settings → API. The
plaintext key is shown only once.
Send it as Authorization: Bearer ct_live_....
In: header
Path Parameters
The invoice's Chargetree identifier.
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invoice_number": "string", "status": "DRAFT", "is_draft": true, "contact": null, "invoice_date": "2019-08-24", "due_date": "2019-08-24", "currency": "string", "line_amount_types": "string", "sub_total": 0, "tax_total": 0, "total": 0, "amount_paid": 0, "amount_due": 0, "line_items": [ { "id": "string", "description": "string", "quantity": 0, "unit_amount": 0, "tax_rate": 0, "tax_amount": 0, "line_amount": 0 } ], "payments": [ { "id": "string", "amount": 0, "currency": "string", "received_at": "2019-08-24T14:15:22Z", "method": "string", "reference": "string", "recorded_by": "user" } ], "reference": "string", "notes": "string", "staff": "string", "is_editable": true, "sent_to_contact": true, "last_sent_at": "2019-08-24T14:15:22Z", "send_count": 0, "pay_url": "string", "xero_invoice_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Escalations
Raised when a customer asks for help, disputes an invoice, requests a human, or refuses to pay. Created by Chargetree's own communications, not by you, so this resource is read-only.
Partner accounts
The Chargetree accounts you provision and manage. Creating an account also creates its login, its payment page, its first API key and, if you supply a webhook address, its webhook endpoint and signing secret.