---
title: "Cancel an order"
method: POST
path: "/orders/cancel"
tags: ["Orders"]
---

# Cancel an order

`POST /orders/cancel`

Cancels an order. Cancellation of an order results in an automatic rollback of all payments made in the order, either by canceling or refunding the payment, depending on the type of payment method.

## Headers

- `Idempotency-Key` string

## Request body

- CancelOrderRequest
  - `merchantAccount` string, required — The merchant account identifier that orderData belongs to.
  - `order` EncryptedOrderData, required
    - `orderData` string, required — The encrypted order data.
    - `pspReference` string, required — The `pspReference` that belongs to the order.

## Response `200`

OK - the request has succeeded.

- CancelOrderResponse
  - `pspReference` string, required — A unique reference of the cancellation request.
  - `resultCode` 'Received', required — The result of the cancellation request. Possible values: * **Received** – Indicates the cancellation has successfully been received by Adyen, and will be processed.

## Other responses

- `400` — Bad Request - a problem reading or understanding the request.
- `401` — Unauthorized - authentication required.
- `403` — Forbidden - insufficient permissions to process the request.
- `422` — Unprocessable Entity - a request validation error.
- `500` — Internal Server Error - the server could not process the request.

---

[API](https://skmtc.net/adyen/apis/adyen-checkout-api.md) · [All operations](https://skmtc.net/adyen/apis/adyen-checkout-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/adyen/adyen-checkout-api/versions/a2d1f411288c/schema)
