---
title: "Write off a debit memo"
method: PUT
path: "/v1/debit-memos/{debitMemoKey}/write-off"
tags: ["Debit Memos"]
---

# Write off a debit memo

`PUT /v1/debit-memos/{debitMemoKey}/write-off`

**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.

Writes off a debit memo. 

By writing off a debit memo,  a credit memo is automatically created and applied to the debit memo. The generated  credit memo items and credit memo taxation items are applied to the corresponding  debit memo items and debit memo taxation items respectively.

**Note**: 
* This API operation  is available only if you have enabled the enhanced write-off permission for your tenant.  Contact <a href="http://support.zuora.com/" target="_blank">Zuora Global Support</a>  to enable this permission.
* The total amount must be equal to the amount entered at the invoice item level.
* If the non revenue impact value  is set to Yes, then the non revenue write off accounting code must be specified.

## Path parameters

- `debitMemoKey` 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

- PUTWriteOffDebitMemoRequest — Container for Credit Memo fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
  - `comment` string — Comments about the write-off. The comment is used as the comment of the credit memo generated by writing off the specified invoice.
  - `amount` number — The write off amount of the invoice.
  - `revenueImpacting` 'Yes' | 'No' — Indicates whether this write off operation impacts the revenue. If `revenueImpacting` = `Yes`, the deferred revenue accounting code will be automatically selected from the associated invoice. The **Exclude Billing Item From Revenue** field will be automatically set to **Yes** by default for such non-revenue impacting write off credit memos, and this setting cannot be changed. This enhancement helps ensure that only revenue-impacting items are synchronized with Zuora Revenue, reducing unnecessary data processing. If `revenueImpacting` = `No`, users can select an accounting code such as bad-debt expense accounting code for the write off operation.
  - `nonRevenueWriteOffAccountingCode` string — Specify the accounting code for the non revenue write off. Available only if `revenueImpacting` = `no`. **Note**: This field is available only if you have enabled the enhanced write-off permission for your tenant. Contact <a href="https://support.zuora.com/hc/en-us" target="_blank">Zuora Global Support</a> to enable this permission.
  - `items` DebitMemoItemFromWriteOffInvoice[] — Container for items. This field is optional. **Note:** If specified, you must specify ALL the items of the invoice. The entire balance of the invoice will be written off, you cannot just write off some items of the invoice.
    - `comment` string — Comments about the credit memo item.
    - `amountWithoutTax` number, double — The credit memo item amount excluding tax.
    - `debitMemoItemId` string — The ID of the debit memo item.
    - `serviceEndDate` string, date — The service end date of the credit memo item.
    - `serviceStartDate` string, date — The service start date of the credit memo item.
    - `skuName` string — The name of the charge associated with the invoice.
    - `unitOfMeasure` string — The definable unit that you measure when determining charges.
    - `excludeItemBillingFromRevenueAccounting` boolean — The flag to exclude the credit memo item from revenue accounting. **Note**: This field is only available if you have the Billing - Revenue Integration feature enabled.
    - `taxationItems` object[] — Container for the taxation items of the credit memo item. **Note**: This field is available only if you are on the latest Zuora API version, or you set the `Zuora-Version` request header to `239.0` or [a later available version](https://developer.zuora.com/v1-api-reference/api-versions/#minor-version).
      - `amount` number — The credit memo taxation amount.
      - `taxationItemId` string — The Id of the debit memo item.
  - `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 write off the invoice.
  - `reasonCode` string — A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code `Write-off`.
  - `IntegrationId__NS` string — ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
  - `IntegrationStatus__NS` string — Status of the credit memo's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
  - `Origin__NS` string — Origin of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
  - `SyncDate__NS` string — Date when the credit memo was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
  - `Transaction__NS` string — Related transaction in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).

## Response `200`

OK

- PUTWriteOffDebitMemoResponse
  - `creditMemo` object — Container for the credit memo that is automatically generated when writing off invoices.
    - `id` string — The ID of the credit memo that is created when the invoice is written off.
  - `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)
