Transaction/CancelOrRefund Web Service
The Transaction/CancelOrRefund REST web service allows you to cancel a transaction entirely or make a refund (total or partial if the buyer supports it).
A full reversal will be performed if the transaction status is one of the following\:
If detailedStatus is equal to CAPTURED, the operation will be a refund. In this case, if the amount transmitted in the query is equal to the amount of the transaction, the refund will be full. If the transmitted amount is lower than the transaction amount, the refund will be partial.
You can partially refund a transaction several times, until it is fully refunded.
Case of chargebacks\: Any attempt of refunding an unpaid transaction will be rejected.
Case of partial cancellation
Use the Transaction/Update web service if you want to change the amount of a transaction that has one of the following statuses\:
For more information on statuses, see the following article\: Transaction lifecycle.
Unique transaction ID generated by the payment gateway.
Payment amount in its smallest currency unit (cent for euro).
Example\: 30050 for EUR 300.50.
A transaction can be authorized and waiting for capture in the bank, or captured in the bank. Depending on the capture status, several operations are possible\:
If the transaction is waiting for capture\:
In this case, it is possible to cancel the transaction. The capture in the bank will not take place. The new transaction statuses are\:
If the transaction is captured\:
In this case, it is no longer possible to cancel the transaction. You must create a new refund transaction.
What Transaction/CancelOrRefund really does\:
The Transaction/CancelOrRefund REST Web Service chooses the operation to perform automatically. However, it is possible to force the type of operation thanks to the resolutionMode parameter.
The possible values are\:
|CANCELLATION_ONLY||Makes a cancellation. If the transaction is captured, an error is returned.|
|REFUND_ONLY||Makes a refund. If the transaction is not captured, an error is returned.|
To go further
For more information on the concept of capture, see the article Canceling/refunding a transaction.
Payment currency. Alphabetic code in uppercase according to alpha-3 (ISO 4217).
Eg\: "EUR" for the euro.
The possible values are\:
|Currency||ISO 4217 ENCODING||Fractional unit|
|Dollar canadien (124)||CAD|
|Danish crown (208)||DKK||2|
|Japanese yen (392)||JPY||0|
|Norwegian crown (578)||NOK||2|
|Pound Sterling (826)||GBP||2|
|US dollar (840)||USD||2|
|Polish zloty (985)||PLN||2|
The web service returns the following object\:
|Transaction||Object containing transaction details.|
See response reference for more information.