Edit invoices
Learn how to edit invoices after finalization.
Stripe lets you revise a finalized invoice in open
or uncollectible
status. You can’t, however, revise an invoice in void
or paid
status. You might want to revise an invoice if you need to:
- Edit the invoice description.
- Edit the customer to update contact information.
- Add, remove, or edit a line item.
- Add a discount or apply taxes.
You can also customize invoices if you need to change their content or branding.
Note
The invoice compliance process can vary across countries. For example, if you’re based in the European Union, you might want to void an invoice and issue a credit note instead of revising the original invoice. Stripe recommends that you consult with your legal counsel for advice specific to your business.
You can use the API to edit an invoice after finalization.
Revise an invoice![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
To begin the post-finalization revision process, use the Create endpoint with the from_
parameter. This request creates a new draft invoice that’s linked back to the original as a revision. It also duplicates all of the invoice line items associated with the invoice. It doesn’t, however, duplicate any invoice credit notes, which could result in a change to the amount due. Also, this request doesn’t pull in pending invoice items the way invoice creation does.
Note
You can’t use the Update endpoint to edit most fields on an invoice after it has been finalized, including monetary amounts, discounts, or customer information.
After you submit a request to create an invoice using the from_
parameter, Stripe responds with the following:
{ "id": "{{FIRST_REVISION_INVOICE_ID}}", "status": "draft", "from_invoice": { "invoice": "{{ORIGINAL_INVOICE_ID}}", "action": "revision", }, }
This new draft invoice has mostly identical fields to the original invoice, with a few exceptions:
- If you updated the invoice’s customer after finalizing the original invoice, the new invoice uses the updated customer information. Note that, if you use automatic tax, this might cause a recalculation of the tax amount.
- If the original invoice had
auto_
, the revision invoice has it set to false.advance == true - The revision invoice’s
starting_
andbalance amount_
reflects any customer balance applied to the original invoice plus any additional balance that is available on the customer object.due
From here, you can make additional changes to the invoice like you would any draft. The following example updates the description of the invoice:
To add a new line item to the revised invoice:
Invoice revisions allow you to update customer information and have it reflected in the PDFs and on the Hosted Invoice Pages of finalized invoices:
After you make all of your desired changes, finalize the revised invoice:
Finalizing the revised invoice changes its state to open
, and sets the finalized_
parameter to the current time stamp (rather than the finalized_
time stamp for the original invoice ). When you finalize an invoice, Stripe does the following:
- Voids the original invoice.
- Adds a
latest_
parameter to the original invoice.revision
Multiple invoice revisions![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
In some cases, you might need to make several revisions to an invoice. The process here is the same one used for the first revision except that Stripe updates the latest_
parameter on all previous revisions. We only update the latest_
parameter on finalization, not when you create the revised invoice.
After you submit a request using the from_
parameter, you receive a response similar to the following:
{ "id": "{{LATEST_REVISION_INVOICE_ID}}", "status": "draft", "from_invoice": { "invoice": "{{FIRST_REVISION_INVOICE_ID}}", "action": "revision", }, # ... more fields }
Finalize the new invoice to complete the revision:
If you attempt to fetch the original invoice, you receive a response indicating that it’s void. Stripe voids the original invoice as soon as the first revision finalizes.
{ "id": "{{ORIGINAL_INVOICE_ID}}", "status": "void", "latest_revision": "{{LATEST_REVISION_INVOICE_ID}}", # This has changed from "{{FIRST_REVISION_INVOICE_ID}". }
Invoice revision constraints![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Stripe enforces several constraints on invoice revisions:
Invoices can have at most one draft revision—If you
POST
to the/v1/invoices
endpoint when anotherdraft
invoice exists with the samefrom_
parameter, Stripe responds with a 400 status code.invoice[invoice] You can only create a revision for invoices with open or uncollectible statuses—If you
POST
to the/v1/invoices
endpoint, andfrom_
corresponds to an invoice with any state other thaninvoice[invoice] open
oruncollectible
, we respond with a 400 status code.If an invoice is open or uncollectible but has a payment intent in the processing state, you can’t create or finalize revisions—If a customer is using a payment method where the invoice status doesn’t update to
paid
when a payment attempt is initiated (likeus_
), we respond with a 400 status code.bank_ account If an open or uncollectible invoice enters a paid or void status or has a processing payment intent while it has a draft revision, you can’t finalize the revision—Stripe enforces this through a 400 status code on any endpoint that could result in invoice finalization, including
/v1/invoices/:id/finalize
,/v1/invoices/:id/pay
, and/v1/invoices/:id/send
.You can’t revise invoices that are attached to a subscription—After finalization, you can’t edit invoices that have a subscription ID after finalization. For these types of invoices, Stripe sends an
invoice.
webhook 1 hour before finalization for all invoices after the first. Additionally, you can’t edit any standalone invoices with subscription line items. These standalone invoices are usually created by pulling in pending proration line items.created You can’t revise invoices that have credit notes—You can’t create a revision for an invoice that has a credit note.