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
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
account_idstring

The unique identifier of the company to list invoices for.

Example:biz_xxxxxxxxxxxxxx

Response

A successful response

Example response

{
  "data": [
    {
      "created_at": "2023-12-01T05:00:00.401Z",
      "current_plan": {
        "currency": "usd",
        "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"
      }
    }
  ]
}

Changes

Changed in 4 of the 74 revisions of this API.2110

    • ●

      deleted the query request parameter company_id

      request-parameter-removed

    • ○

      added the new optional query request parameter account_id

      new-optional-request-parameter

    This revision also has 9 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      added the required property // to the response with the status

      response-required-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • f67a043e319027See the full diff
    • ▲

      the query request parameter direction was restricted to a list of enum values

      request-parameter-became-enum

    • ▲

      the query request parameter order was restricted to a list of enum values

      request-parameter-became-enum

    • ○

      added the new enum value asc to the query request parameter direction

      request-parameter-enum-value-added

    • ○

      added the new enum value created_at to the query request parameter order

      request-parameter-enum-value-added

    • ○

      added the new enum value desc to the query request parameter direction

      request-parameter-enum-value-added

    • ○

      added the new enum value due_date to the query request parameter order

      request-parameter-enum-value-added

    • ○

      added the new enum value id to the query request parameter order

      request-parameter-enum-value-added

    • ○

      for the query request parameter direction, the type was generalized from no type to string

      request-parameter-type-generalized

    • ○

      for the query request parameter order, the type was generalized from no type to string

      request-parameter-type-generalized

    • ○

      added the required property // to the response with the status

      response-required-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 74 revisions, 1 has no diff computed.