Preview Invoice
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_id
Request
This endpoint expects an object.
customer_id
invoice_type
status
collection_method
billing_reason
currency
Invoice currency. If not provided, inferred from the first item's price currency.
issued_at
Invoice issue date. Defaults to the current time if not provided.
due_date
description
metadata
custom_fields
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_id
ID of a coupon to attach as a discount to this invoice.
net_d
Number of days after issuance that the invoice is due. Overrides due_date if provided.
default_payment_method_id
ID of the default payment method for this invoice.
show_payment_link
When true, the ‘Pay online’ link is rendered on the invoice PDF and in-app preview.
items
Response
Successful Response
id
customer_id
status
currency
ISO 4217 currency codes.
subtotal_amount_atom
tax_amount_atom
total_amount_atom
due_amount_atom
paid_amount_atom
remaining_amount_atom
issued_at
due_date
description
metadata
created_at
updated_at
applied_balance_amount_atom
total_discount_amount_atom
period_start
period_end
collection_method
custom_fields
Custom field values. Only included when expand=custom_fields is specified.
items
invoice_number
billing_reason
subscription_id
payment_method_id
invoice_pdf_url
receipt_pdf_url
hosted_invoice_url
show_payment_link
Errors
422
Unprocessable Entity Error