API cancel
The cancel API is used to cancel part of an authorized amount (e.g. if a customer cancel part of their order) before the transaction is financed.
This API is only available for transactions initiated with the "captureMode" field set to "Validate" which has been confirmed but not yet validated.
A call to this method:
- Will release an authorized amount that would have been reserved otherwise for the customer's payment method. This is of particular importance in the case of a money reserve, as it makes the canceled amount available for other orders.
- Can be made multiple times within the limit of the authorized amount.
| ResponseCode | ResponseMessage | Comment |
|---|---|---|
| 000 | API Success | |
| 003 | Transaction Key is not an accepted transaction | |
| 012 | Transaction Key has already been cancelled | Transaction already in Canceled state |
| 013 | cancelAmount greater than authorizedAmount-cancelledAmount | cancelAmount and authorizedAmount can be found in the responses of cancel, getStatus and confirm |
| 022 | TransactionKey does not exist | The pair “merchantTransactionID”, “merchantTransactionDate” does not exist for this partner |
| 910/916 | Technical error - unable to cancel transaction | A technical error on Cofidis side prevented the confirm call to run properly |