Cancel payments Copy section link Copied!
Depending on the payment method used for a transaction, you can cancel a payment. If the payment can’t be cancelled, then you would want to refund it instead.
The ability to cancel a payment depends on:
- The payment method used to process the initial payment
- The operation status:
- Registered: The operation is created
Please refer to each payment method section below to learn more about its specificities.
Please refer to the payment flow to understand when this operation is valid.
Cancel a payment Copy section link Copied!
From your server, make a /payin/cancel request:
Example Copy section link Copied!
{
"orderId": "432156",
"transactionId": "123456789"
}
Retrieving the result Copy section link Copied!
In response to your request, you will receive the transactionActionsResponse object, including the following:
resultCode of the processing
List of transaction for the order
Example Copy section link Copied!
Here is a JSON payload example of a /payin/cancel request:
{
"resultCode": "0",
"orderStatus": "complete",
"transactionList": [
{
"id": "123123123",
"status": "completed",
"amount": {
"value": "100",
"currency": "EUR"
},
"paymentMethodId": "002"
}
]
}
If your request encountered an error, you can use the following codes for troubleshooting. You can also check these additional resources:
Cancel by payment method Copy section link Copied!
As described in the process flow diagrams, the cancel operation can be done under certain conditions.
SCT Copy section link Copied!
The payment can only be cancelled if the operation status is registered and if the transaction status is completed.
SDD payments Copy section link Copied!
The payment can only be cancelled if the operation status is registered and if the transaction status is completed. Also, the cancellation date must be earlier than the payment date before 12pm.
Card payments Copy section link Copied!
In the case of a card payment, a card capture can be cancelled if it has been authorized and captured.
Also, the capture can be cancelled if:
- The transaction status must be completed.
- The cancellation date must be equal to the capture date.
- The cancellation must be accepted.
The authorization itself can’t be cancelled, but an authorization doesn’t imply a payment.