Skip to navigation

Preview an invoice

Returns what the order's next invoice would be right now, with its lines inline. Nothing is stored. The order must be active or paused.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Headers

Paid-BetaenumRequired

This endpoint is in the invoices=v1 beta. Send this header to use it.

Allowed values:

Query parameters

orderstringRequired1-255 characters

The ord_ order whose next invoice to preview.

Response

200
objectenum

The type of object. Always invoicePreview.

Allowed values:
amountsobject

Integers in minor units of the invoice’s currency.

billingContactslist of strings

The con_ contacts who receive the invoice.

currencystring

Lowercase ISO 4217 currency code, e.g. usd.

customerstring1-255 characters

The customer billed, as its cus_ ID. For order invoices, the order’s billTo.

dueAtdatetime or null

When payment is due. On a draft it’s projected from paymentTerms; finalizing keeps the same gap from issuedAt.

lineslist of objects
Every line, inline.
orderstring or null1-255 characters

The ord_ order the invoice bills; null on manual ones.

overdueboolean

true when finalized, not paid, something is still owed and dueAt has passed.

paymentStatusenum

null on drafts and voided invoices; kept on uncollectible ones, which can still be paid.

Allowed values:
paymentTermsenum

From the order on order invoices; set on manual ones. null when a manual invoice was given only a dueAt.

periodobject

A span of time; endsAt is exclusive.

purchaseOrderNumberstring or null
Printed on the document.
sourceenum

order when the billing run, an activation or an amendment built it from an order, manual when it was created with invoices.create.

Allowed values:
statusenum

draft until finalized, then finalized. uncollectible once written off, voided once voided; voided is final. Payment is paymentStatus, not this. Expect new values.

Allowed values:
taxobject
Tax on the invoice.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error