Skip to main content
POST
Typescript (SDK)

Body Parameters

Response

Authorizations

Authorization
string
header
required

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

Headers

x-api-version
string
default:2.4.0
required

Body

application/json
customer_id
string
required

The customer to invoice.

plans
object[]
custom_line_items
object[]

Charges that are not tied to any plan or feature.

discounts
AttachDiscount · object[]

Discounts applied to the whole invoice.

invoice_template_id
string

ID of an invoice template whose footer, memo and default payment terms are applied.

net_terms_days
integer

Days until the invoice is due. Defaults to the template's terms, then the org default.

Required range: -9007199254740991 < x <= 9007199254740991
issue_date
integer

Date of issue printed on the invoice, in milliseconds. Defaults to now; cannot be in the future.

Required range: 0 <= x <= 9007199254740991
due_date
integer

When payment is due, in milliseconds. Must be in the future; takes precedence over net_terms_days.

Required range: 0 <= x <= 9007199254740991
tax_rate_id
string

Stripe tax rate ID (txr_...) applied to every line.

period_start
integer

Start of the period being invoiced, in milliseconds. Prorated lines are charged for period_start → period_end against one price interval starting at period_start.

Required range: 0 <= x <= 9007199254740991
period_end
integer

End of the period being invoiced, in milliseconds.

Required range: 0 <= x <= 9007199254740991
preview
boolean

If true, returns the calculated lines and totals without creating an invoice.

Response

200 - application/json

OK

invoice
object | null
required

The created invoice. Null when preview is true.

preview
object
required