Invoices

Query invoices

Use when listing or searching invoices (e.g. admin view or customer history). Returns a paginated list; supports filtering by customer, status, date range.

post/invoices/search

Request body

amount_due_gtnumber

amount_due_gt filters invoices with a total amount due greater than the specified value Useful for finding invoices above a certain threshold or identifying high-value invoices

amount_remaining_gtnumber

amount_remaining_gt filters invoices with an outstanding balance greater than the specified value Useful for finding invoices that still have significant unpaid amounts

billing_reason'SUBSCRIPTION_CREATE' | 'SUBSCRIPTION_CYCLE' | 'SUBSCRIPTION_UPDATE' | 'SUBSCRIPTION_TRIAL_END' | 'SUBSCRIPTION_TRIAL_START' | 'PRORATION' | 'MANUAL' | 'AUTO_INVOICE_THRESHOLD' | 'WALLET_AUTO_TOPUP'
currencystring

currency filters invoices by their currency (ISO 4217 code, e.g. "usd", "eur"). Matches on the invoices.currency column exactly.

customer_idstring

customer_id filters invoices for a specific customer using FlexPrice's internal customer ID This is the ID returned by FlexPrice when creating or retrieving customers

end_timestring date-time
expandstring
external_customer_idstring

external_customer_id filters invoices for a customer using your system's customer identifier This is the ID you provided when creating the customer in FlexPrice

invoice_idsstring[]

invoice_ids restricts results to invoices with the specified IDs Use this to retrieve specific invoices when you know their exact identifiers

invoice_statusTypesInvoiceStatus[]

invoice_status filters by the current state of invoices in their lifecycle Multiple statuses can be specified to include invoices in any of the listed states

invoice_type'SUBSCRIPTION' | 'ONE_OFF' | 'CREDIT'
limitinteger
offsetinteger
order'asc' | 'desc'
payment_statusTypesPaymentStatus[]

payment_status filters by the payment state of invoices Multiple statuses can be specified to include invoices with any of the listed payment states

period_end_gtestring

period_end_gte filters invoices with period_end >= value

period_end_ltestring

period_end_lte filters invoices with period_end <= value

period_start_gtestring

period_start_gte filters invoices with period_start >= value

period_start_ltestring

period_start_lte filters invoices with period_start <= value

skip_line_itemsboolean

SkipLineItems if true, will not include line items in the response

start_timestring date-time
status'published' | 'deleted' | 'archived'
subscription_customer_idstring[]

subscription_customer_id filters invoices by the subscription owner's customer ID

subscription_idstring

subscription_id filters invoices generated for a specific subscription Only returns invoices that were created as part of the specified subscription's billing

Response

OK

Changes

Changed in 7 of the 12 revisions of this API.32638

  • cef2964c102c215See the full diff
    • removed the optional property items/items/subscription/customer_timezone from the response with the 200 status

      response-optional-property-removed

    • added the new VOIDED enum value to the items/items/payment_status response property for the response status 200

      response-property-enum-value-added

    • added the new optional request property billing_reason

      new-optional-request-property

    • added the new optional request property currency

      new-optional-request-property

    • added the new VOIDED enum value to the request property payment_status/items/

      request-property-enum-value-added

    • added the optional property items/items/customer/integrations/items/metadata to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/customer/timezone to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/line_items/items/adjusted_entitlement_quantity to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/line_items/items/subscription_line_item_id to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/coupon_associations/items/coupon/coupon_code to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/coupon_associations/items/subscription_line_item to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/customer/integrations/items/metadata to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/customer/timezone to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/line_items/items/commitment_time_buckets to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/line_items/items/price/sequence to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/synced_price_sequence to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/timezone to the response with the 200 status

      response-optional-property-added

  • f62d8a5fe7cf41See the full diff
    • removed the optional property details from the response with the 400 status

      response-optional-property-removed

    • removed the optional property details from the response with the 500 status

      response-optional-property-removed

    • added the new too_many_requests enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new too_many_requests enum value to the code response property for the response status 500

      response-property-enum-value-added

    • added the optional property items/items/issue_date to the response with the 200 status

      response-optional-property-added

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

  • 0cb3425d658096See the full diff
    • removed the optional property items/items/subscription/line_items/items/trial_period_days from the response with the 200 status

      response-optional-property-removed

    • added the new ONETIME enum value to the items/items/line_items/items/commitment_info/duration response property for the response status 200

      response-property-enum-value-added

    • added the new ONETIME enum value to the items/items/subscription/billing_period response property for the response status 200

      response-property-enum-value-added

    • added the new ONETIME enum value to the items/items/subscription/commitment_duration response property for the response status 200

      response-property-enum-value-added

    • added the new ONETIME enum value to the items/items/subscription/line_items/items/billing_period response property for the response status 200

      response-property-enum-value-added

    • added the new ONETIME enum value to the items/items/subscription/line_items/items/commitment_duration response property for the response status 200

      response-property-enum-value-added

    • added the new ONETIME enum value to the items/items/subscription/line_items/items/price/billing_period response property for the response status 200

      response-property-enum-value-added

    • added the new delegated_invoicing enum value to the items/items/subscription/subscription_type response property for the response status 200

      response-property-enum-value-added

    • added the new grouped_invoicing enum value to the items/items/subscription/subscription_type response property for the response status 200

      response-property-enum-value-added

    • added the new optional request property subscription_customer_id

      new-optional-request-property

    • added the optional property items/items/subscription/auto_invoice_threshold to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/line_items/items/addon_association_id to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription_customer_id to the response with the 200 status

      response-optional-property-added

    • removed the ONETIME enum value from the items/items/subscription/billing_cadence response property for the response status 200

      response-property-enum-value-removed

    • removed the ONETIME enum value from the items/items/subscription/line_items/items/price/billing_cadence response property for the response status 200

      response-property-enum-value-removed

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

  • 82f205e0f42922See the full diff
    • removed the optional property items/items/subscription/line_items/items/price/trial_period from the response with the 200 status

      response-optional-property-removed

    • removed the optional property items/items/subscription/line_items/items/trial_period from the response with the 200 status

      response-optional-property-removed

    • added the optional property items/items/subscription/line_items/items/price/trial_period_days to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/line_items/items/trial_period_days to the response with the 200 status

      response-optional-property-added

  • 4ded3711f401189See the full diff
    • the items/items/billing_period response's property type/format changed from string/date-time to string/ for status 200

      response-property-type-changed

    • removed the optional property error from the response with the 400 status

      response-optional-property-removed

    • removed the optional property error from the response with the 500 status

      response-optional-property-removed

    • removed the optional property items/items/customer/parent_customer from the response with the 200 status

      response-optional-property-removed

    • removed the optional property items/items/customer/parent_customer_id from the response with the 200 status

      response-optional-property-removed

    • removed the optional property items/items/subscription/customer/parent_customer from the response with the 200 status

      response-optional-property-removed

    • removed the optional property items/items/subscription/customer/parent_customer_id from the response with the 200 status

      response-optional-property-removed

    • removed the optional property success from the response with the 400 status

      response-optional-property-removed

    • removed the optional property success from the response with the 500 status

      response-optional-property-removed

    • added the optional property code to the response with the 400 status

      response-optional-property-added

    • added the optional property code to the response with the 500 status

      response-optional-property-added

    • added the optional property details to the response with the 400 status

      response-optional-property-added

    • added the optional property details to the response with the 500 status

      response-optional-property-added

    • added the optional property http_status_code to the response with the 400 status

      response-optional-property-added

    • added the optional property http_status_code to the response with the 500 status

      response-optional-property-added

    • added the optional property items/items/subscription/subscription_type to the response with the 200 status

      response-optional-property-added

    • added the optional property message to the response with the 400 status

      response-optional-property-added

    • added the optional property message to the response with the 500 status

      response-optional-property-added

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

  • d1860fe0ee67214See the full diff
    • the end_time request property type/format changed from string/ to string/date-time

      request-property-type-changed

    • the start_time request property type/format changed from string/ to string/date-time

      request-property-type-changed

    • added the new SKIPPED enum value to the items/items/invoice_status response property for the response status 200

      response-property-enum-value-added

    • added the new SKIPPED enum value to the request property invoice_status/items/

      request-property-enum-value-added

    • added the optional property items/items/customer/integrations to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/last_computed_at to the response with the 200 status

      response-optional-property-added

    • added the optional property items/items/subscription/customer/integrations to the response with the 200 status

      response-optional-property-added

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

    • added the optional property items/items/recalculated_invoice_id to the response with the 200 status

      response-optional-property-added

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