Skip to content

Invoices

Create
client.invoices.create(InvoiceCreateParams { invoice_id, line_items, tags } body, RequestOptionsoptions?): InvoiceCreateResponse { data }
POST/invoices
List
client.invoices.list(RequestOptionsoptions?): InvoiceListResponse { data }
GET/invoices
List History
client.invoices.listHistory(stringid, RequestOptionsoptions?): InvoiceListHistoryResponse { data }
GET/invoices/{id}/history
Retrieve
client.invoices.retrieve(stringid, RequestOptionsoptions?): InvoiceRetrieveResponse { data }
GET/invoices/{id}
Search
client.invoices.search(InvoiceSearchParams { filter, page_info } body, RequestOptionsoptions?): InvoiceSearchResponse { data }
POST/invoices/search
Update
client.invoices.update(stringid, InvoiceUpdateParams { current_invoice_version, line_items, tags } body, RequestOptionsoptions?): InvoiceUpdateResponse { data }
PATCH/invoices/{id}
ModelsExpand Collapse
Invoice { id, created, status, 5 more }

Invoice object

id: string

Unique identifier for the invoice

created: string

ISO 8601 timestamp when the invoice was created

formatdate-time
Deprecatedstatus: "active"

Deprecated: The status of the invoice

tags: Array<Tag>

Metadata tags for this invoice

key: string

Tag key

value: string

Tag value

version: number

The current version of the invoice. Pass this value when updating to ensure thread safety.

workspace_id: string

Workspace ID this invoice belongs to

line_items?: Array<LineItem>

List of line items associated with this invoice

id: string

Unique identifier for the line item

Deprecatedamount: string

Deprecated: use price.amount instead. Total amount in smallest currency unit (represented as string for bigint)

currency_code: "ADA" | "BTC" | "DAI" | 176 more

Currency code (ISO 4217 or crypto)

Accepts one of the following:
"ADA"
"BTC"
"DAI"
"ETH"
"SOL"
"USDC"
"USDT"
"USDG"
"EURC"
"CADC"
"CADT"
"XLM"
"UNI"
"BCH"
"LTC"
"AAVE"
"LINK"
"MATIC"
"PTS"
"AED"
"AFN"
"ALL"
"AMD"
"ANG"
"AOA"
"ARS"
"AUD"
"AWG"
"AZN"
"BAM"
"BBD"
"BDT"
"BGN"
"BHD"
"BIF"
"BMD"
"BND"
"BOB"
"BRL"
"BSD"
"BTN"
"BWP"
"BYR"
"BZD"
"CAD"
"CDF"
"CHF"
"CLP"
"CNY"
"COP"
"CRC"
"CUC"
"CUP"
"CVE"
"CZK"
"DJF"
"DKK"
"DOP"
"DZD"
"EGP"
"ERN"
"ETB"
"EUR"
"FJD"
"FKP"
"GBP"
"GEL"
"GGP"
"GHS"
"GIP"
"GMD"
"GNF"
"GTQ"
"GYD"
"HKD"
"HNL"
"HRK"
"HTG"
"HUF"
"IDR"
"ILS"
"IMP"
"INR"
"IQD"
"IRR"
"ISK"
"JMD"
"JOD"
"JPY"
"KES"
"KGS"
"KHR"
"KMF"
"KPW"
"KRW"
"KWD"
"KYD"
"KZT"
"LAK"
"LBP"
"LKR"
"LRD"
"LSL"
"LYD"
"MAD"
"MDL"
"MGA"
"MKD"
"MMK"
"MNT"
"MOP"
"MUR"
"MVR"
"MWK"
"MXN"
"MYR"
"MZN"
"NAD"
"NGN"
"NIO"
"NOK"
"NPR"
"NZD"
"OMR"
"PAB"
"PEN"
"PGK"
"PHP"
"PKR"
"PLN"
"PYG"
"QAR"
"RON"
"RSD"
"RUB"
"RWF"
"SAR"
"SBD"
"SCR"
"SDG"
"SEK"
"SGD"
"SHP"
"SLL"
"SOS"
"SPL"
"SRD"
"SVC"
"SYP"
"STN"
"SZL"
"THB"
"TJS"
"TMT"
"TND"
"TOP"
"TRY"
"TTD"
"TVD"
"TWD"
"TZS"
"UAH"
"UGX"
"USD"
"UYU"
"UZS"
"VEF"
"VND"
"VUV"
"WST"
"XAF"
"XCD"
"XOF"
"XPF"
"YER"
"ZAR"
"ZMW"
"LOGICAL"
"CUSTOM"
description: string

Description of the line item

price: Price { amount, quantity, unit_price }

Price breakdown containing amount, unit price, and quantity

amount: string

Total amount in smallest currency unit (represented as string for bigint)

quantity: number

Quantity of units for this line item

unit_price: string

Unit price in smallest currency unit (represented as string for bigint)

product_id: string

ID of the product/catalog item

tags: Array<Tag>

Metadata tags for this line item

key: string

Tag key

value: string

Tag value

type: "payin" | "payout"

The type of the line item

Accepts one of the following:
"payin"
"payout"
user_id: string

External ID of the user associated with this line item

modified?: string

ISO 8601 timestamp when the invoice was last modified

formatdate-time