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.
- Split data either at time of payment or capture for Adyen for Platforms.
Instead, check if the payment has been captured and make a corresponding /refund
or /cancel
call.
For more information, refer to Cancel or refund.
This endpoint is part of our classic API integration. If using a newer integration, use the
/payments/{paymentPspReference}/reversals
endpoint under Checkout API instead.
Servers
- https://pal-test.adyen.com/pal/servlet/Payment/v68
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
uniqueTerminalId |
String | No |
Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. |
originalReference |
String | Yes |
The original pspReference of the payment to modify. This reference is returned in:
|
tenderReference |
String | No |
The transaction reference provided by the PED. For point-of-sale integrations only. |
merchantAccount |
String | Yes |
The merchant account that is used to process the payment. |
mpiData |
Object | No |
Authentication data produced by an MPI (Mastercard SecureCode, Visa Secure, or Cartes Bancaires). |
mpiData.riskScore |
String | No |
Risk score calculated by Directory Server (DS). Required for Cartes Bancaires integrations. |
mpiData.eci |
String | No |
The electronic commerce indicator. |
mpiData.cavvAlgorithm |
String | No |
The CAVV algorithm used. Include this only for 3D Secure 1. |
mpiData.authenticationResponse |
String | No |
In 3D Secure 1, the authentication response if the shopper was redirected. In 3D Secure 2, this is the Possible values:
|
mpiData.directoryResponse |
String | No |
In 3D Secure 1, this is the enrollment response from the 3D directory server. In 3D Secure 2, this is the Possible values:
|
mpiData.threeDSVersion |
String | No |
The version of the 3D Secure protocol. |
mpiData.challengeCancel |
String | No |
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. Possible values:
|
mpiData.dsTransID |
String | No |
Supported for 3D Secure 2. The unique transaction identifier assigned by the Directory Server (DS) to identify a single transaction. |
mpiData.tokenAuthenticationVerificationValue |
String | No |
Network token authentication verification value (TAVV). The network token cryptogram. |
mpiData.xid |
String | No |
Supported for 3D Secure 1. The transaction identifier (Base64-encoded, 20 bytes in a decoded form). |
mpiData.transStatusReason |
String | No |
Provides information on why the |
mpiData.cavv |
String | No |
The cardholder authentication value (base64 encoded, 20 bytes in a decoded form). |
originalMerchantReference |
String | No |
The original merchant reference to cancel. |
reference |
String | No |
Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. |
additionalData |
Object | No |
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. |
platformChargebackLogic |
Object | No |
Defines how to book chargebacks when using Adyen for Platforms. |
platformChargebackLogic.costAllocationAccount |
String | No |
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. |
platformChargebackLogic.targetAccount |
String | No |
The unique identifier of the balance account against which the disputed amount is booked. Required if |
platformChargebackLogic.behavior |
String | No |
The method of handling the chargeback. Possible values: deductFromLiableAccount, deductFromOneBalanceAccount, deductAccordingToSplitRatio. Possible values:
|
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.