Method: Stripe::Invoice#void_invoice

Defined in:
lib/stripe/resources/invoice.rb

#void_invoice(params = {}, opts = {}) ⇒ Object

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to [issue another invoice or <a href=“#create_credit_note”>credit note](docs.stripe.com/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.



1258
1259
1260
1261
1262
1263
1264
1265
# File 'lib/stripe/resources/invoice.rb', line 1258

def void_invoice(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/invoices/%<invoice>s/void", { invoice: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end