Retrieve an invoice by ID

Retrieves a single invoice by its unique identifier. The invoice must exist, not be soft-deleted, and belong to the merchant account resolved from the secret key. Line-item price, accountDiscounts, and accountFees follow the same expand pattern as GET subscription (site, customer): id only when not expanded; full embedded JSON when expanded. Use customer to return the full customer object in customer (same semantics as defaultPaymentMethod). Use defaultPaymentMethod (or default_payment_method) to return the full payment method object in defaultPaymentMethod; without expand it remains the payment method id string.

Path Params
string
required
length between 10 and 128

Invoice ID (e.g. inv_a11YYufWQzNY63zpQ6QSNRQhkUpVph4WRmzW0zWJO2znZKdVujZ0N0S22u). Must be valid, not soft deleted, and belong to the merchant account.

Query Params
string

Comma-separated list of paths to expand (case-insensitive). Examples: customer (full customer object in customer from DynamoDB, and customerEmail, customerName, customerPhone, customerAddress from snapshot or DynamoDB); defaultPaymentMethod or default_payment_method (full payment method object from DynamoDB in defaultPaymentMethod); lineItemsGroup.lineItems.price (full price object and productDescription); lineItemsGroup.lineItems.accountDiscounts; lineItemsGroup.lineItems.accountFees. Id-only vs full object/array matches subscription expand behavior. test_clock returns the expanded test clock object associated with the invoice's subscription (omitted when the subscription has no test clock).

Headers
string
required

Secret key associated to the partner's account (e.g. sk_age14sf40sSwfchDsaetaqsgh3001e4gf2ed)

string

(Optional) AccountId of the merchant that will own the site (e.g. acm_********). Only required when secretKey belongs to an "entity" account.

string

Unique Key String refNumber

string

Unique key generated by the partner (e.g. 490ff93e-8a73-4aa4-a02b-9d9251f91243)

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json