v8

OpenAPI 3.1.02026-08-033623795.0 MB
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 nullable

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

beforestring nullable

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

firstinteger nullable

Returns the first n elements from the list.

Example:42
lastinteger nullable

Returns the last n elements from the list.

Example:42
company_idstring nullable

The unique identifier of the company to list invoices for.

Example:biz_xxxxxxxxxxxxxx
direction'asc' | 'desc'

The direction of the sort.

product_idsstring[] nullable

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

collection_methodsInvoiceCollectionMethods[] nullable

Filter invoices by their collection method.

statusesInvoiceStatuses[] nullable

Filter invoices by their current status.

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

Which columns can be used to sort.

created_beforestring date-time nullable

Only return invoices created before this timestamp.

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

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