---
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 [inactive](https://docs.adyen.com/online-payments/upgrade-your-integration#checkout-api-lifecycle) and is no longer supported for new integrations.
> * If you are building a new integration, use the Checkout API [`/payments/{paymentPspReference}/reversals`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/(paymentPspReference)/reversals) endpoint instead.
> * If you have an existing integration using this endpoint, reach out to your Adyen contact and [migrate to the Checkout API](https://docs.adyen.com/online-payments/upgrade-your-integration/migrate-to-checkout-api).

> The Checkout API enables your [online payments](https://docs.adyen.com/online-payments) integration to accept all supported payment methods, use the latest features, and access more benefits.

## 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.
  - `originalReference` string, required — The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification
  - `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.

---

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