Reference

Invoices

Raise, amend, send and cancel invoices. Invoices move through the statuses `DRAFT`, `SCHEDULED`, `UNPAID`, `OVERDUE`, `PARTIALLY_PAID`, `PAID` and `CANCELLED`.

GET/invoices

Returns invoices newest first, using cursor pagination. Keep following next_cursor until has_more is false.

Authorization

accountKey
AuthorizationBearer <token>

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

status?string

Filter by status. Accepts a single status or a comma-separated list, for example UNPAID,OVERDUE.

contact_id?string

Only invoices belonging to this contact.

Formatuuid
invoice_number?string

Exact match on the invoice number.

date_from?string

Only invoices dated on or after this day.

Formatdate
date_to?string

Only invoices dated on or before this day.

Formatdate
limit?integer

How many invoices to return. Values above 100 are capped at 100.

Range1 <= value <= 100
Default25
cursor?string

The 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}
POST/invoices

Creates 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
AuthorizationBearer <token>

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

Idempotency-Key?string

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"}
GET/invoices/{id}

Returns a single invoice, including its line items and any payments recorded against it.

Authorization

accountKey
AuthorizationBearer <token>

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

id*string

The invoice's Chargetree identifier.

Formatuuid

Response 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"}
PUT/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
AuthorizationBearer <token>

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

id*string

The invoice's Chargetree identifier.

Formatuuid

Request 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"}
POST/invoices/{id}/cancel

Soft-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
AuthorizationBearer <token>

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

id*string

The invoice's Chargetree identifier.

Formatuuid

Response 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"}