Skip to main content

Cancel an order line item

Zuora

Cancel an order line item

If there is some issue when the order line item is being processed and the order line item becomes invalid, you must cancel the order line item on the order. To cancel an existing order line item, its state must be Executing. If the order line item is already updated to SentToBilling, you cannot cancel it. For more information about the state transition flow of an order line item, see Order Line Item states, Order states, and state transitions.

There are two ways to cancel an order line item:

  • In the Zuora application, update the order line item state to Canceled
  • Use the "Update an order line item" operation

Canceling an order line item takes effect immediately and cannot be undone. After the order line item is canceled, it will not be invoiced.

Use the Zuora application

  1. Log in to the Zuora application and then navigate to Customers > Orders. The Orders page opens.
  2. Search for the order that contains the order line item to be updated and click the order number. The Order details page opens.
  3. In the Order Line Items area, on the target line of the order line item, click the pencil icon in the ACTIONS column. The Edit Order Line Item window is displayed.

    edit-order-line-item.png

  4. In the Basic Information section, change the Item State value from Executing to Canceled.
  5. Click Save. The window is closed. 

Use the REST API

Use the Update an order line item operation to cancel an order line item. Use the Update order line items operation to cancel multiple order line items at once. You must first determine the following field values for this operation:

  • itemId: The ID of the order line item to be canceled. You can obtain the ID of an order line item from the order that includes the order line item by using the Retrieve an order operation or from the URI of the Order Line Item Details page in the UI.
  • itemState: The state of the order line item. Set this field to the Canceled to cancel the order line item immediately.
Request PUT /v1/order-line-items/{itemId}
Request Body
{
   "itemState": "Canceled",
   "billTargetDate": "2021-02-01"
}