Skip to main content
GET
/
v1
/
invoices
List Invoices
curl --request GET \
  --url https://api.withflex.com/v1/invoices \
  --header 'Authorization: Bearer <token>'
{
  "invoices": [
    {
      "invoice_id": "obj_01EXAMPLE00000000000000000",
      "total": 0,
      "amount_due": 0,
      "amount_paid": 0,
      "charge": "string",
      "period_end": "string",
      "period_start": "string",
      "status": "draft",
      "collection_method": "charge_automatically",
      "test_mode": false,
      "metadata": {},
      "created_at": "2024-01-01T00:00:00Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Use a Bearer token to access this API.

Query Parameters

customer
string | null

Filter invoices by customer ID

Example:

"obj_01EXAMPLE00000000000000000"

starting_after
string | null

A cursor for use in pagination. starting_after is an invoice ID that defines your place in the list. For instance, if you make a list request and receive 20 invoices, ending with fin_xyz, your subsequent call can include starting_after=fin_xyz to fetch the next page.

Example:

"obj_01EXAMPLE00000000000000000"

ending_before
string | null

A cursor for use in pagination. ending_before is an invoice ID that defines your place in the list. For instance, if you make a list request and receive 20 invoices, starting with fin_abc, your subsequent call can include ending_before=fin_abc to fetch the previous page.

Example:

"obj_01EXAMPLE00000000000000000"

limit
integer<int32> | null

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

Required range: 1 <= x <= 100
Example:

10

Response

Success

invoices
object[]
required