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
invoice_id
string
required

The Autumn invoice ID to void and replace.

invoice_template_id
string

ID of an invoice template (configured in billing settings) whose footer and memo are applied to the replacement invoice.

net_terms_days
integer

Number of days the customer has to pay the replacement invoice. Defaults to the original invoice's due date; required when that date has already passed. A card-charged invoice has no due date and its replacement is charged immediately; setting this makes the replacement a send-invoice one instead.

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

If true, returns the replacement invoice's lines and totals without voiding anything or issuing it.

update_customer_email
string<email>

Updates the customer's billing email before the replacement is issued, so Stripe sends the new invoice to this address.

invoice
object

Changes that apply to the replacement invoice only.

customer
object

Changes written to the customer, which the replacement snapshots and later invoices inherit.

lines
object

Add, change or drop lines relative to the original.

Response

200 - application/json

OK

invoice
object | null
required

The replacement invoice. Null when preview is true.

voided_invoice_id
string | null
required

The Autumn ID of the original invoice, now void. Null when previewing, and when the original was paid and got a credit note instead.

credit_note_id
string | null
required

The Stripe credit note issued against a paid original, whose amount lands on the customer's balance and covers the replacement. Null when the original was open and voided instead.

preview
object
required

The replacement's lines and totals.