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.
Cancel a payment
From your server, make a /payin/cancel request:
Retrieving the result
In response to your request, you will receive the transactionActionsResponse object, including the following:
resultCode of the processing
List of transaction for the order
Here is a JSON payload example of a /payin/cancel request:
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
As described in the process flow diagrams, the cancel operation can be done under certain conditions.
The payment can only be cancelled if the operation status is registered and if the transaction status is completed.
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.
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.