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

# Reverse an invoice

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

**Note:** This operation is only available if you have [Invoice Settlement](https://docs.zuora.com?resourceId=billing-invoice-settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://docs.zuora.com?resourceId=billing-invoice-settlement-migration-checklist-and-guide) for more information.

Reverses a posted invoice. The reversal operation is performed asynchronously when the invoice contains more than 2,000 items in total.  

 If the specified invoice was created through invoice splitting, reversing that  invoice also reverses all split invoices that were generated from the same original invoice.  The original parent invoice remains in `Split` status and is not reversed. 

**Restrictions**

You are not allowed to reverse an invoice if any of the following restrictions is met:
* Payments and credit memos are applied to the invoice.
* The invoice is split.
* The invoice is not in Posted status.
* The total amount of the invoice is less than 0 (a negative invoice).
* Using Tax Connector for Extension Platform to calculate taxes.
* An invoice contains more than 50,000 items in total, including invoice items, discount items, and taxation items.

See [Invoice Reversal](https://docs.zuora.com?resourceId=billing-Invoice-reversal) for more information.

## 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

## Request body

- PutReverseInvoiceType
  - `applyEffectiveDate` string, date — The date when the credit memo is applied to the invoice that will be reversed, in `yyyy-mm-dd` format. The effective date must be later than or equal to the memo date. The default value is the date when you reverse the invoice and create the credit memo. **Note:** If the target invoice is a split invoice, this date must be equal to or later than all invoice dates in the split invoice group.
  - `comment` string — Comments about the reversal. The comment is used as the comment of the credit memo generated by reversing the specified invoice.
  - `memoDate` string, date — The date when the credit memo was created, in `yyyy-mm-dd` format. The memo date must be later than or equal to the invoice date. The default value is the date when you reverse the invoice and create the credit memo. **Note:** If the target invoice is a split invoice, this date must be equal to or later than all invoice dates in the split invoice group.
  - `reasonCode` string — A code identifying the reason for the reversal. The value must be an existing reason code or empty. The code is used as the reason code of the credit memo generated by reversing the specified invoice. If you do not specify a value, Zuora uses the default reason code `Invoice reversal` for the credit memo.

## Response `200`

OK

- PutReverseInvoiceResponseType
  - `creditMemo` object — Container for the credit memo that is automatically generated during the invoice reversal.
    - `id` string — The ID of the credit memo.
  - `creditMemos` ReverseInvoiceResponseCreditMemo[] — Array of credit memo objects generated by the reversal. This field can contain multiple items when the target invoice belongs to a split invoice group.
    - `id` string — The ID of the credit memo.
  - `debitMemo` object — Container for the debit memo that is automatically generated during the reversal of the credit memo related to this invoice. If no related credit memo is reversed, this field is not returned in the response body.
    - `id` string — The ID of the debit memo.
  - `id` string, nullable — The ID of the invoice to be reversed. This field is available only when the reversal operation is performed asynchronously.
  - `jobId` string, nullable — The ID of the job that handles the invoice reversal operation. You can specify the value of this field as the value of the `jobId` path parameter in the [Retrieve an operation job](https://developer.zuora.com/v1-api-reference/api/operation/GET_OperationJob/) API operation to query job information. This field is available only when the reversal operation is performed asynchronously.
  - `jobStatus` 'Pending' | 'Processing' | 'Failed' | 'Completed', nullable — The status of the invoice reversal operation. This field is available only when the reversal operation is performed asynchronously.
  - `success` boolean — Returns `true` if the request was processed successfully.

## 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)
