Cancels or refunds a payment.
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 request for payments that involve (multiple) partial captures.
For more information, refer to Cancel or refund.
Body
-
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. For more information on possible key-value pairs, refer to the ModificationRequest.additionalData section.
-
The merchant account that is used to process the payment.
-
modificationAmount object
The amount that needs to be captured/refunded. Required for
/capture
and/refund
, not allowed for/cancel
. Thecurrency
must match the currency used in authorisation, thevalue
must be smaller than or equal to the authorised amount. -
originalMerchantReference string
The original merchant reference to cancel.
-
The original pspReference of the payment to modify. This reference is returned in:
- authorisation response
- authorisation notification
-
reference string
Optionally, you can specify your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters.
-
splits array[object]
The details of how the payment should be split when distributing a payment to a Marketpay Marketplace and its Accounts.
-
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.
curl \
-X POST https://pal-test.adyen.com/pal/servlet/Payment/v40/cancelOrRefund \
-H "Content-Type: application/json" \
-d '{"additionalData":{},"merchantAccount":"string","modificationAmount":{"currency":"string","value":42},"originalMerchantReference":"string","originalReference":"string","reference":"string","splits":[{"account":"string","amount":{"currency":"string","value":42},"description":"string","reference":"string","type":"Commission"}],"tenderReference":"string","uniqueTerminalId":"string"}'
{
"additionalData": {},
"merchantAccount": "string",
"modificationAmount": {
"currency": "string",
"value": 42
},
"originalMerchantReference": "string",
"originalReference": "string",
"reference": "string",
"splits": [
{
"account": "string",
"amount": {
"currency": "string",
"value": 42
},
"description": "string",
"reference": "string",
"type": "Commission"
}
],
"tenderReference": "string",
"uniqueTerminalId": "string"
}
{
"additionalData": {},
"merchantAccount": "string",
"modificationAmount": {
"currency": "string",
"value": 42
},
"originalMerchantReference": "string",
"originalReference": "string",
"reference": "string",
"splits": [
{
"account": "string",
"amount": {
"currency": "string",
"value": 42
},
"description": "string",
"reference": "string",
"type": "Commission"
}
],
"tenderReference": "string",
"uniqueTerminalId": "string"
}
{
"additionalData": {},
"pspReference": "string",
"response": "[capture-received]"
}
{
"additionalData": {},
"pspReference": "string",
"response": "[capture-received]"
}