# Edit invoices Learn how to edit invoices after finalization. You can’t revise invoices that are attached to *subscriptions* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) after finalization. For these types of invoices, the **Edit invoice** button is disabled. 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](https://docs.stripe.com/invoicing/customize.md) if you need to change their content or branding. > 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. # Dashboard > This is a Dashboard for when testing-method is without-code. View the full page at https://docs.stripe.com/invoicing/invoice-edits?testing-method=without-code. You can use the [Dashboard](https://dashboard.stripe.com/test/dashboard) to revise invoices after finalization. Learn how to revise an invoice and notify your customer, update their email address, change the payment collection method, and so on. ## Revise an invoice and notify your customer To revise an invoice and notify your customer, complete the following steps: 1. Go to the **Invoice details** page and click **Edit invoice**. This opens up the **Invoice Editor** and creates a new draft invoice. (If you stop in the middle of a revision, you can come back later to continue editing the draft.) You’ll see a notice at the top of the editor that references the last sent invoice. > You can also go to the [Invoices page](https://dashboard.stripe.com/test/invoices), click the overflow menu (⋯), then **Edit invoice**. 1. In the editor, update the field you want to revise. While all of the invoice fields are revisable, you can’t switch the customer or modify the product. 1. Click **Review invoice**, and decide whether you want to notify the customer by email. ![Notify your about an updated invoice](https://b.stripecdn.com/docs-statics-srv/assets/invoice-revisions-notify-customer.68b421b920fc5e85f06d8a4acfbcc3ec.png) Notify your customer about an updated invoice 1. When you click **Update invoice**, Stripe finalizes the new invoice and voids the old one. The editor closes and redirects you to the details page for the new invoice. The embedded timeline shows all of your revisions. In the **Invoice details** page, navigate down to the **History** section to see old and new invoices. When you click an invoice that Stripe voided due to a revision, you’re directed to its details page where you can see the revision timeline. ![See an invoice's revision history](https://b.stripecdn.com/docs-statics-srv/assets/invoice-revisions-history-section.79e3d40e3ae874352d91cb7478250647.png) See an invoice’s revision history ## Change your customer's email address If you want to update the email address associated with an invoice: 1. Click the **Edit** button (✏) under **Customer** in the editor. 1. Change the email address using the **Email** field. Previous recipients can still access this invoice through any of the older invoice emails. You can also use the **Update customer** dialog to change your customer’s email address. ![Update your customer's email address](https://b.stripecdn.com/docs-statics-srv/assets/invoice-revisions-update-email-address.abc3f10a991006065c5132fc6e1ec704.png) Update your customer’s email address 1. Click **Review invoice**, followed by **Update invoice**. The **Update invoice** dialog displays all of the email addresses associated with the previous invoice including old (and copied) customer emails. ## Update the payment collection method If you want to revise an invoice to automatically charge your customer, click **Automatically charge a payment method on file**, and then review the invoice. Before you proceed to automatically charge the customer, a dialog appears that asks you whether your customer is aware of the change. The dialog also lets you add an internal note for future reference. ## Edit a draft invoice linked to a revision If you want to return to a draft invoice that’s associated with a revision, complete the following steps: 1. Exit the editor. 1. When you’re ready to resume editing, click the draft invoice in the **History** section of the **Invoice details** page, or use the **Edit invoice** button. A dialog appears notifying you that Stripe saved previous, unfinalized changes to a draft. 1. Choose to continue editing the draft or create a new one. ## Customers and revised invoices When you revise an invoice and choose to notify your customer: 1. Stripe sends them a new email. The subject line of the email indicates that you made an update and also references the old invoice number. 1. When your customer clicks into the email, they see a revised invoice with the new invoice number. Within the revised invoice, there’s an **Older versions** section that displays older invoices. Your customer can download PDFs of any of the old invoices for their records. ![Updated invoice email](https://b.stripecdn.com/docs-statics-srv/assets/invoice-revisions-customer-email.929ab2abffa15f996eedd5245543e36c.png) Updated invoice email Stripe lists every invoice version under **Older versions**. Because the latest email contains all of the relevant invoice information, your customer doesn’t have to search their inbox for previous invoices. If your customer clicks **Pay this invoice** in an old email, we automatically redirect them to the latest Hosted Invoice Page. # API > This is a API for when testing-method is with-code. View the full page at https://docs.stripe.com/invoicing/invoice-edits?testing-method=with-code. You can use the [API](https://docs.stripe.com/api/invoices.md) to edit an invoice after finalization. ## Revise an invoice To begin the post-finalization revision process, use the [Create](https://docs.stripe.com/api/invoices/create.md) endpoint with the `from_invoice` 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. > You can’t use the [Update](https://docs.stripe.com/api/invoices/update.md) endpoint to edit most fields on an invoice after it has been finalized, including monetary amounts, discounts, or customer information. ```curl curl https://api.stripe.com/v1/invoices \ -u "<>:" \ -d "from_invoice[invoice]"={{ORIGINAL_INVOICE_ID}} \ -d "from_invoice[action]"=revision ``` After you submit a request to create an invoice using the `from_invoice` parameter, Stripe responds with the following: ```json { "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](https://docs.stripe.com/tax/invoicing.md), this might cause a recalculation of the tax amount. - If the original invoice had `auto_advance == true`, the revision invoice has it set to false. - The revision invoice’s `starting_balance` and `amount_due` reflects any [customer balance](https://docs.stripe.com/invoicing/customer/balance.md) applied to the original invoice plus any additional balance that is available on the customer object. From here, you can make additional changes to the invoice like you would any draft. The following example updates the description of the invoice: ```curl curl https://api.stripe.com/v1/invoices/{{FIRST_REVISION_INVOICE_ID}} \ -u "<>:" \ -d description="Updated maintenance contract" ``` To add a new line item to the revised invoice: ```curl curl https://api.stripe.com/v1/invoiceitems \ -u "<>:" \ -d customer="{{CUSTOMER_ID}}" \ -d invoice={{FIRST_REVISION_INVOICE_ID}} \ -d "pricing[price]"="{{PRICE_ID}}" \ -d quantity=100 \ --data-urlencode description="Additional Stripe swag!" ``` Invoice revisions allow you to update customer information and have it reflected in the PDFs and on the Hosted Invoice Pages of finalized invoices: ```curl curl https://api.stripe.com/v1/customers/{{CUSTOMER_ID}} \ -u "<>:" \ -d name="John Doe" ``` After you make all of your desired changes, finalize the revised invoice: ```curl curl -X POST https://api.stripe.com/v1/invoices/{{FIRST_REVISION_INVOICE_ID}}/finalize \ -u "<>:" ``` Finalizing the revised invoice changes its state to `open`, and sets the `finalized_at` parameter to the current time stamp (rather than the `finalized_at` time stamp for the original invoice ). When you finalize an invoice, Stripe does the following: - Voids the original invoice. - Adds a `latest_revision` parameter to the original invoice. ## Multiple invoice revisions 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_revision` parameter on all previous revisions. We only update the `latest_revision` parameter on finalization, not when you create the revised invoice. ```curl curl https://api.stripe.com/v1/invoices \ -u "<>:" \ -d "from_invoice[invoice]"={{FIRST_REVISION_INVOICE_ID}} \ -d "from_invoice[action]"=revision ``` After you submit a request using the `from_invoice` parameter, you receive a response similar to the following: ```json { "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: ```curl curl -X POST https://api.stripe.com/v1/invoices/{{LATEST_REVISION_INVOICE_ID}}/finalize \ -u "<>:" ``` 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. ```json { "id": "{{ORIGINAL_INVOICE_ID}}", "status": "void", "latest_revision": "{{LATEST_REVISION_INVOICE_ID}}", # This has changed from "{{FIRST_REVISION_INVOICE_ID}". } ``` ## Invoice revision constraints Stripe enforces several constraints on invoice revisions: - **Invoices can have at most one draft revision**—If you `POST` to the `/v1/invoices` endpoint when another `draft` invoice exists with the same `from_invoice[invoice]` parameter, Stripe responds with a 400 status code. - **You can only create a revision for invoices with open or uncollectible statuses**—If you `POST` to the `/v1/invoices` endpoint, and `from_invoice[invoice]` corresponds to an invoice with any state other than `open` or `uncollectible`, 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 (like `us_bank_account`), we respond with a 400 status code. - **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.created` webhook [1 hour before finalization](https://docs.stripe.com/billing/subscriptions/webhooks.md#understand) 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. - **You can’t revise invoices that have credit notes**—You can’t create a revision for an invoice that has a [credit note](https://docs.stripe.com/api/credit_notes.md). ## See also - [Use the Dashboard](https://docs.stripe.com/invoicing/dashboard.md) - [Integrate with the API](https://docs.stripe.com/invoicing/integration.md) - [Hosted Invoice Page](https://docs.stripe.com/invoicing/hosted-invoice-page.md)