Invoices

List invoices

get/v1/invoices

Request

  • Base URL
    https://api.withflex.com
  • URL
    https://api.withflex.com/v1/invoices
  • Auth
    HTTP bearer

Query parameters

expandstring

Comma-separated list of related objects to expand in the response.

customerstring nullable

Filter invoices by customer ID

Example:fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA
starting_afterstring nullable

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:fin_01J9XR8M3K7VZ8N2YB4WJ6T0RA
ending_beforestring nullable

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:fin_01J9XR8M3K7VZ8N2YB4WJ6T0RA
limitinteger nullable

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

Example:10

Response

An envelope wrapping a list of invoice objects.

Example response

{
  "invoices": [
    {
      "invoice_id": "fin_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "total": 2500,
      "amount_due": 2500,
      "amount_paid": 2500,
      "payment_intent": "fpi_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "charge": "fch_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "customer": "fcus_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "period_end": "string",
      "period_start": "string",
      "subscription": "fsub_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
      "paid_at": "string",
      "status": "draft",
      "collection_method": "charge_automatically",
      "test_mode": false,
      "metadata": {
        "order_id": "8842",
        "channel": "shopify"
      },
      "created_at": "2026-06-15T14:30:00Z",
      "backup_charge_status": "pending"
    }
  ]
}

Changes

    • breaking

      the /////////// response's property format changed from email to no format for status

    • breaking

      the //////////////////// response's property format changed from email to no format for status

    • breaking

      the ///////////////////////// response's property format changed from email to no format for status

    • warning

      added the new adaptiveShoesDependent enum value to the /////////////////////////// response property for the response status

    • warning

      added the new automatedCleaner enum value to the /////////////////////////// response property for the response status

    • warning

      added the new babyMonitorSplit enum value to the /////////////////////////// response property for the response status

    • warning

      added the new babySleepApp enum value to the /////////////////////////// response property for the response status

    • warning

      added the new bodyPillow enum value to the /////////////////////////// response property for the response status

    • warning

      added the new breathWorkDependent enum value to the /////////////////////////// response property for the response status

    • warning

      added the new coolingSleepwear enum value to the /////////////////////////// response property for the response status

    • warning

      added the new meneralsNootropicPouch enum value to the /////////////////////////// response property for the response status

    • warning

      added the new nonenalOdor enum value to the /////////////////////////// response property for the response status

    • warning

      added the new nursingChairs enum value to the /////////////////////////// response property for the response status

    • warning

      added the new speechHealthDependent enum value to the /////////////////////////// response property for the response status

    • warning

      added the new uvClothing enum value to the /////////////////////////// response property for the response status

    • warning

      added the new uvGlasses enum value to the /////////////////////////// response property for the response status

    • info

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

    • info

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

    • info

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

    • info

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