Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer tools
Overview
Billing
    Overview
    About the Billing APIs
    Subscriptions
    Invoicing
      Overview
      API quickstart
      Integrate with the API
      Invoicing without code
      Invoice lifecycle
      Preview invoices
      Edit invoices
      Schedule invoice finalisation
      Status transitions and finalisation
      Send customer emails
      Generate credit notes
      Invoice customers
      Customers
      Customer credit balance
      Customer tax IDs
      Invoice payments
      Hosted Invoice Page
      Create invoice payment plans
      Accept partial payments
      Payment methods for invoices
      Automated collections
      Invoice customisation
      Customise invoices
      Invoice rendering templates
      Group invoice line items
      Summarise line items
      Global invoicing
      Best practices
      Multi-currency customers
      Other invoicing features
      Products and prices
      Manage bulk invoice line items
      Taxes
    Usage-based billing
    Connect and Billing
    Tax and Billing
    Quotes
    Revenue recovery
    Automations
    Scripts
    Revenue recognition
    Customer management
    Entitlements
    Test your integration
Tax
Reporting
Data
Startup incorporation
HomeRevenueBillingInvoicing

Edit invoices

Learn how to edit invoices after finalization.

Copy page

Subscription invoices

You can’t revise invoices that are attached to subscriptions after finalization. For these types of invoices, the Edit invoice button is disabled.

Stripe lets you revise a finalised 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 customise 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 finalisation.

Revise an invoice

To begin the post-finalisation revision process, use the Create 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 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 finalised, including monetary amounts, discounts, or customer information.

Command Line
cURL
curl https://api.stripe.com/v1/invoices \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -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:

{ "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 finalising 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_advance == true, the revision invoice has it set to false.
  • The revision invoice’s starting_balance and amount_due reflects any customer balance 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:

Command Line
cURL
curl https://api.stripe.com/v1/invoices/{{FIRST_REVISION_INVOICE_ID}} \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d description="Updated maintenance contract"

To add a new line item to the revised invoice:

Command Line
cURL
curl https://api.stripe.com/v1/invoiceitems \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -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:

Command Line
cURL
curl https://api.stripe.com/v1/customers/{{CUSTOMER_ID}} \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d name="John Doe"

After you make all of your desired changes, finalize the revised invoice:

Command Line
cURL
curl -X POST https://api.stripe.com/v1/invoices/{{FIRST_REVISION_INVOICE_ID}}/finalize \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

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.

Command Line
cURL
curl https://api.stripe.com/v1/invoices \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -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:

{ "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:

Command Line
cURL
curl -X POST https://api.stripe.com/v1/invoices/{{LATEST_REVISION_INVOICE_ID}}/finalize \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

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

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 finalisation, you can’t edit invoices that have a subscription ID after finalisation. For these types of invoices, Stripe sends an invoice.created webhook 1 hour before finalisation 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 pro-rata 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.

See also

  • Use the Dashboard
  • Integrate with the API
  • Hosted Invoice Page
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc