---
title: "Cancel an invoice"
method: PUT
path: "/v1/invoices/{invoiceKey}/cancel"
tags: ["Invoices"]
---

# Cancel an invoice

`PUT /v1/invoices/{invoiceKey}/cancel`

Cancel the invoice synchronously or asynchronously based on the number of invoice 
items it contains. By default, Zuora cancels invoices with fewer than 1,000 invoice 
items synchronously and cancels invoices with 1,000 or more invoice items asynchronously. 


For invoices with more than 1,000 invoice items, use the `jobStatus` field in the response 
to determine whether the operation is still in progress or has completed. If `jobStatus` is 
`Completed`, the operation has finished. If `jobStatus` is `Pending`, the operation is still 
in progress, and you must check the job status later to confirm completion. 


**Note:** To change this threshold, submit a request to <a href="https://support.zuora.com/" target="_blank">Zuora Global Support</a>

## Path parameters

- `invoiceKey` string, required

## Headers

- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string
- `Zuora-Version` string

## Response `200`

OK

- CancelInvoiceResponseType
  - `id` string — The ID of the business object which is being operated.
  - `jobId` string — The ID of the operation job.
  - `jobStatus` 'Pending' | 'Processing' | 'Failed' | 'Completed' — The status of the job.
  - `success` boolean — Indicates whether the request was successful.

## Other responses

- `500` — Internal Server Error
- `4XX` — Request Errors

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
