<- Invoices API

Invoices API

Cancel invoice

POST

 /v2/invoices/{invoice_id}/cancel

Cancels an invoice.

The seller cannot collect payments for the canceled invoice.

You cannot cancel an invoice in the DRAFT state or in a terminal state: PAID, REFUNDED, CANCELED, or FAILED.

Permissions:ORDERS_WRITE, INVOICES_WRITE
Try in API Explorer
Link to section

Path parameters

Example code

Link to section

invoice_id

string

Required

The ID of the invoice to cancel.

Link to section

Request body

Link to section

version

integer(32-bit)

Required

The version of the invoice to cancel. If you do not know the version, you can call GetInvoice or ListInvoices.

Link to section

Response fields

Link to section

invoice

The canceled invoice.

Link to section

errors

Information about errors encountered during the request.