---
title: "Cancel or refund a payment"
method: POST
path: "/cancelOrRefund"
tags: ["Modifications"]
---

# Cancel or refund a payment

`POST /cancelOrRefund`

Cancels a payment if it has not been captured yet, or refunds it if it has already been captured. This is useful when it is not certain if the payment has been captured or not (for example, when using auto-capture).

Do not use this endpoint for payments that involve:
 * [Multiple partial captures](https://docs.adyen.com/online-payments/capture).
 * [Split data](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information) either at time of payment or capture for Adyen for Platforms.

 Instead, check if the payment has been captured and make a corresponding [`/refund`](https://docs.adyen.com/api-explorer/#/Payment/refund) or [`/cancel`](https://docs.adyen.com/api-explorer/#/Payment/cancel) call.

For more information, refer to [Cancel or refund](https://docs.adyen.com/online-payments/classic-integrations/modify-payments/cancel-or-refund).

> This endpoint is part of our [classic API integration](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce). If using a [newer integration](https://docs.adyen.com/online-payments), use the [`/payments/{paymentPspReference}/reversals`](https://docs.adyen.com/api-explorer/#/CheckoutService/payments/{paymentPspReference}/reversals) endpoint under Checkout API instead.

## Request body

- CancelOrRefundRequest
  - `additionalData` object — This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value.
  - `merchantAccount` string, required — The merchant account that is used to process the payment.
  - `mpiData` ThreeDSecureData
    - `authenticationResponse` 'Y' | 'N' | 'U' | 'A' — In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter.
    - `cavv` string, byte — The cardholder authentication value (base64 encoded, 20 bytes in a decoded form).
    - `cavvAlgorithm` string — The CAVV algorithm used. Include this only for 3D Secure 1.
    - `challengeCancel` '01' | '02' | '03' | '04' | '05' | '06' | '07' — Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata).
    - `directoryResponse` 'A' | 'C' | 'D' | 'I' | 'N' | 'R' | 'U' | 'Y' — In 3D Secure 2, this is the `transStatus` from the `ARes`.
    - `dsTransID` string — Supported for 3D Secure 2. The unique transaction identifier assigned by the Directory Server (DS) to identify a single transaction.
    - `eci` string — The electronic commerce indicator.
    - `riskScore` string — Risk score calculated by Directory Server (DS). Required for Cartes Bancaires integrations.
    - `threeDSVersion` string — The version of the 3D Secure protocol.
    - `tokenAuthenticationVerificationValue` string, byte — Network token authentication verification value (TAVV). The network token cryptogram.
    - `transStatusReason` string — Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values).
    - `xid` string, byte — Supported for 3D Secure 1. The transaction identifier (Base64-encoded, 20 bytes in a decoded form).
  - `originalMerchantReference` string — The original merchant reference to cancel.
  - `originalReference` string, required — The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification
  - `platformChargebackLogic` PlatformChargebackLogic
    - `behavior` 'deductAccordingToSplitRatio' | 'deductFromLiableAccount' | 'deductFromOneBalanceAccount' — The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**.
    - `costAllocationAccount` string — The unique identifier of the balance account to which the chargeback fees are booked. By default, the chargeback fees are booked to your liable balance account.
    - `targetAccount` string — The unique identifier of the balance account against which the disputed amount is booked. Required if `behavior` is **deductFromOneBalanceAccount**.
  - `reference` string — Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters.
  - `tenderReference` string — The transaction reference provided by the PED. For point-of-sale integrations only.
  - `uniqueTerminalId` string — Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only.

## Response `200`

OK - the request has succeeded.

- ModificationResult
  - `additionalData` object — This field contains additional data, which may be returned in a particular modification response.
  - `pspReference` string, required — Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.
  - `response` '[capture-received]' | '[cancel-received]' | '[refund-received]' | '[cancelOrRefund-received]' | '[adjustAuthorisation-received]' | '[donation-received]' | '[technical-cancel-received]' | '[voidPendingRefund-received]' | 'Authorised' | 'Refused' | 'Error', required — Indicates if the modification request has been received for processing.

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

## Changes

- **2026-02-17** (v68) `a50b3c514a2e` — 2 warning
  - added the new `Error` enum value to the `response` response property for the response status `200`
  - added the new `Refused` enum value to the `response` response property for the response status `200`
- **2024-10-21** (v68) `fd8bf53fedad` — 1 warning
  - added the new `Authorised` enum value to the `response` response property for the response status `200`

[Change history](https://skmtc.dev/adyen/apis/paymentservice/changes/cancelOrRefund/post.md)

---

[API](https://skmtc.dev/adyen/apis/paymentservice.md) · [All operations](https://skmtc.dev/adyen/apis/paymentservice/llms.txt) · [OpenAPI document](https://skmtc.dev/adyen/apis/paymentservice/revisions/da43ff6bccdf?raw)
