---
title: "Cancel order lines"
method: DELETE
path: "/orders/{orderId}/lines"
tags: ["Orders API"]
deprecated: true
---

# Cancel order lines

`DELETE /orders/{orderId}/lines`

> **Deprecated.**

**⚠️ We no longer recommend using the Orders API. Please refer to the [Payments API](payments-api) instead.**

Cancel one or more order lines that were previously authorized. To cancel the entire order, please refer to the [Cancel order](cancel-order) endpoint instead.

Canceling or partially canceling an order line will immediately release the authorization held for that amount. You should cancel an order line if you do not intend to (fully) ship it.

If the order line was already authorized, the authorization will be released.

For an order line with status `shipping`, the authorization for the quantity that is still pending will be released.

Afterwards, the order line will be marked `completed`.

If the order line is `paid` or already `completed`, you can create a refund using the [Create order refund](create-order-refund) endpoint instead.

> 🔑 Access with
>
> [API key](/reference/authentication)
>
> [Advanced access token with **orders.write**](/reference/authentication)
>
> [OAuth access with **orders.write**](/reference/authentication)

## Request body

- object
  - `lines` object[], required
    - `id` string, required — The identifier uniquely referring to this order line. Mollie assigns this identifier at order line creation time. Example: `odl_jp31jz`.
    - `quantity` integer — The number of items that should be canceled for this order line. When this parameter is omitted, the whole order line will be canceled. When part of the line has been shipped, the remaining quantity will be canceled and the order line will be marked `completed`. Must be less than the number of items already shipped or canceled for this order line.
    - `amount` object — The amount that you want to cancel. In almost all cases, Mollie can determine the amount automatically. The amount is required only if you are *partially* canceling an order line which has a non-zero `discountAmount`. The amount you can cancel depends on various properties of the order line and the cancel order lines request. The maximum that can be canceled is `unit price x quantity to cancel`. The minimum amount depends on the discount applied to the line, the quantity already shipped or canceled, the amounts already shipped or canceled and the quantity you want to cancel. If you do not send an amount, Mollie will determine the amount automatically or respond with an error if the amount cannot be determined automatically.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
  - `testmode` boolean, nullable — Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting `testmode` to `true`. Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.

## Response `204`

An empty response.

## Other responses

- `404` — No entity with this ID exists.
- `422` — The request contains issues. For example, if you are trying to cancel an order line that can no longer be canceled.
- `429` — Rate Limit has been reached.

---

[API](https://skmtc.net/mollie/apis/accepting-payments.md) · [All operations](https://skmtc.net/mollie/apis/accepting-payments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mollie/accepting-payments/revisions/4b45df3039ef/schema)
