Preview Invoice

View as Markdown

Preview an invoice without persisting it.

Resolves prices and computes totals using pure computation — no rows are created, no invoice numbers claimed, no row locks acquired. Returns the same Invoice response with server-computed totals.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

account_idstringRequired

Request

This endpoint expects an object.
customer_idstringRequired
invoice_typeenumOptional
statusenumOptional
collection_methodenumOptional
billing_reasonenum or nullOptional
currencyenum or nullOptional
Invoice currency. If not provided, inferred from the first item's price currency.
issued_atdatetime or nullOptional
Invoice issue date. Defaults to the current time if not provided.
due_datedatetime or nullOptional
descriptionstring or nullOptional
metadatamap from strings to any or nullOptional
custom_fieldsmap from strings to any or nullOptional
Custom field values to set on this invoice. Keys must match defined field keys for the invoice entity type. Set a key to null to delete that field's value.
coupon_idstring or nullOptional
ID of a coupon to attach as a discount to this invoice.
net_dinteger or nullOptional

Number of days after issuance that the invoice is due. Overrides due_date if provided.

default_payment_method_idstring or nullOptional
ID of the default payment method for this invoice.
itemslist of objects or nullOptional

Response

Successful Response
idstring
customer_idstring
statusenum
currencyenum
ISO 4217 currency codes.
subtotal_amount_atominteger or null
tax_amount_atominteger or null
total_amount_atominteger or null
due_amount_atominteger or null
paid_amount_atominteger or null
remaining_amount_atominteger or null
issued_atdatetime
due_datedatetime or null
descriptionstring or null
metadatamap from strings to any or null
created_atdatetime
updated_atdatetime
applied_balance_amount_atominteger or nullOptional
total_discount_amount_atominteger or nullOptional
period_startdatetime or nullOptional
period_enddatetime or nullOptional
collection_methodenumOptional
custom_fieldsmap from strings to any or nullOptional

Custom field values. Only included when expand=custom_fields is specified.

itemslist of objectsOptional
invoice_numberinteger or nullOptional
billing_reasonenum or nullOptional
subscription_idstring or nullOptional
payment_method_idstring or nullOptional
invoice_pdf_urlstring or nullOptional
receipt_pdf_urlstring or nullOptional
hosted_invoice_urlstring or nullOptional

Errors

422
Unprocessable Entity Error