Get a list of invoices

API used to retrieve a paginated list of invoices with filtering, search, and keyset pagination. IMPORTANT: - Results are always sorted by created date in descending order (newest first). - This endpoint MUST use keyset pagination. - The keyset pagination token (next_results_token) is only sent as part of the API response when there are more records to be retrieved from the backend. When there are no other records to be retrieved the next_results_token will be "null" in the API response. - The keyset pagination token (next_results_token) must be a base64 encoded version of the concatenation of key-value pairs that make up the pagination cursor (e.g. base64("cdt:timestamp|id:invoiceId"))

Query Params
int32
Defaults to 10

Integer representing the number of records to retrieve at once

int64

Unix timestamp for created date start filter (inclusive). Must be less or equal to created_end.

int64

Unix timestamp for created date end filter (inclusive). Must be greater or equal to created_start.

string

Customer ID to filter invoices by. Must be a valid customerId belonging to the merchant account.

string

Comma separated string of invoice status enums. Allowed values draft, open, paid, voided, uncollectible.

boolean

Filter invoices marked as past due

string

Subscription ID to filter invoices by.

string

When set, restrict to invoices linked to this site id (strict match).

string

Filter invoices by billing reason. Allowed values are "manual" and "subscription_related".

string

Search term to filter by invoice number or customer name

string

(Optional) Base64 encoded pagination cursor. Decoded format: cdt:<created_timestamp>|id:<invoice_id> Example: base64("cdt:1732046457|id:inv_674240eebe94ddc95e044fd2")

string

Sort order. Format: field:direction. Default: created:desc. Only created is supported.

Headers
string
required

Unique secretKey String e.g. sk_age14sf40sSwfchDsaetaqsgh3001e4gf2ed associated to the partner's account

string

(Optional) AccountId of the merchant. Only required when secretKey belongs to an "entity" account. (e.g. acm_********)

string

Unique Key String refNumber

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json