Skip to main content
POST
Query invoices

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

application/json

Filter

amount_due_gt
number

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_gt
number

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
enum<string>
Available options:
SUBSCRIPTION_CREATE,
SUBSCRIPTION_CYCLE,
SUBSCRIPTION_UPDATE,
SUBSCRIPTION_TRIAL_END,
SUBSCRIPTION_TRIAL_START,
PRORATION,
MANUAL,
AUTO_INVOICE_THRESHOLD,
WALLET_AUTO_TOPUP
currency
string

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

customer_id
string

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_time
string<date-time>
expand
string
external_customer_id
string

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

filters
object[]
invoice_ids
string[]

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

invoice_status
enum<string>[]

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

Available options:
DRAFT,
FINALIZED,
VOIDED,
SKIPPED
invoice_type
enum<string>
Available options:
SUBSCRIPTION,
ONE_OFF,
CREDIT
limit
integer
Required range: 1 <= x <= 1000
offset
integer
Required range: x >= 0
order
enum<string>
Available options:
asc,
desc
payment_status
enum<string>[]

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

Available options:
INITIATED,
PENDING,
PROCESSING,
SUCCEEDED,
OVERPAID,
FAILED,
REFUNDED,
PARTIALLY_REFUNDED,
VOIDED
period_end_gte
string

period_end_gte filters invoices with period_end >= value

period_end_lte
string

period_end_lte filters invoices with period_end <= value

period_start_gte
string

period_start_gte filters invoices with period_start >= value

period_start_lte
string

period_start_lte filters invoices with period_start <= value

skip_line_items
boolean

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

sort
object[]
start_time
string<date-time>
status
enum<string>
Available options:
published,
deleted,
archived
subscription_customer_id
string[]

subscription_customer_id filters invoices by the subscription owner's customer ID

subscription_id
string

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

items
object[]
pagination
object