latestOpenAPI 3.1.02026-08-213914255.9 MB

715c4defcbbf

Invoices

List invoices

Returns a paginated list of invoices for a company, with optional filtering by product, status, collection method, and creation date.

Required permissions:

  • invoice:basic:read
get/invoices

Query parameters

afterstring

Returns the elements in the list that come after the specified cursor.

beforestring

Returns the elements in the list that come before the specified cursor.

firstinteger

Returns the first n elements from the list.

Example:42
lastinteger

Returns the last n elements from the list.

Example:42
company_idstring

The unique identifier of the company to list invoices for.

Example:biz_xxxxxxxxxxxxxx
direction'asc' | 'desc'

The direction of the sort.

product_idsstring[]

Filter invoices to only those associated with these specific product identifiers.

collection_methodsInvoiceCollectionMethods[]

Filter invoices by their collection method.

statusesInvoiceStatuses[]

Filter invoices by their current status.

order'id' | 'created_at' | 'due_date'

Which columns can be used to sort.

created_beforestring date-time

Only return invoices created before this timestamp.

Example:2023-12-01T05:00:00.401Z
created_afterstring date-time

Only return invoices created after this timestamp.

Example:2023-12-01T05:00:00.401Z

Response

A successful response

Example response

{
  "data": [
    {
      "created_at": "2023-12-01T05:00:00.401Z",
      "current_plan": {
        "formatted_price": "$10.00",
        "id": "plan_xxxxxxxxxxxxx"
      },
      "due_date": "2023-12-01T05:00:00.401Z",
      "email_address": "customer@example.com",
      "fetch_invoice_token": "eyJhbGciOiJIUzI1NiJ9...",
      "id": "inv_xxxxxxxxxxxxxx",
      "line_items": [
        {
          "label": "Platform subscription",
          "position": 42,
          "quantity": 6.9,
          "total": 6.9,
          "unit_price": 6.9
        }
      ],
      "number": "#0001",
      "user": {
        "id": "user_xxxxxxxxxxxxx",
        "name": "John Doe",
        "username": "johndoe42"
      }
    }
  ]
}