This endpoint is used to reverse a payment that has not yet been captured, effectively canceling the authorization.
Transaction ID created in your system. It should be unique for each payment.
Your unique reference number for the specific operation. You can pass this value to reconcile different operations in a payment (authorization, capture, refund, etc) individually. It is recommended to limit the length to 18 characters so that it works for all payment methods. Allowed characters: (A-Z, a-z) and digits (0-9)
A collection of additional custom data provided by you to store extra information about the transaction. This is a set of JSON key value pairs passed by you. Paygate will return the data as it is in the response.
- Testhttps://test.computop-paygate.com/api/v2/payments/{id}/reversals
- Productionhttps://www.computop-paygate.com/api/v2/payments/{id}/reversals
curl -i -X POST \
-u '<username>:<password>' \
'https://test.computop-paygate.com/api/v2/payments/{id}/reversals' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: string' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"transId": "6B29FC40-1067-B31D-00DD010662DA",
"amount": {
"value": 10000,
"currency": "EUR"
},
"refNr": "24235345432",
"paymentMethods": {
"amazonPay": {
"reversalReason": "Customer Cancellation"
}
}
}'Successful operation
A unique identifier assigned by Computop Paygate to the payment. This ID remains constant throughout the lifecycle of the payment and is used to track and reference the payment across all subsequent operations, such as authorization, capture, refund, or cancellation.
A unique identifier assigned by Computop Paygate for each operation in the payment. For example: xId will be different for the authorization and capture operations of a payment whereas payId will be same.
A collection of additional custom data provided by you to store extra information about the transaction. This is a set of JSON key value pairs as you passed in the request.
{ "merchantId": "MerchantIdTest", "payId": "6B29FC4093DD010662DE", "xId": "6B29FC4093DD010662DB", "transId": "trans-id-123", "refNr": "6729FC4093DA010662DA", "status": "OK", "responseCode": "00000000", "responseDescription": "success", "paymentMethods": { "amazonPay": { … } } }