Skip to content

Cancel

Cancel

When you need to initiate a cancel for a transaction, you can call the POST Cancel interface.

Note

Cancel is only supported for incomplete authorization.

Sync Flow:

Async Flow:

The main process is as follows:

  1. When you initiate the cancel, you will use the merchantTransInfo.merchantTransID that you provided when calling the POST Payment interface. You need to add this parameter to the URL of the POST Cancel request so that EVO Cloud can locate the original pre-authorization transaction and initiate the cancel.

  2. Check the cancel.status field in the EVO Cloud response. If the value of this field is Success, it indicates that the cancel was successful; otherwise, you need to check result.code and result.message to find out the reason for the transaction failure.

  3. If you do not receive a response from EVO Cloud, you need to call GET Cancel to query the transaction result. When you receive the query response, you should also check the cancel.status field to determine the transaction result, using the same judgment method as in step 2. If the transaction fails, you need to check cancel.failureCode and cancel.failureReason to find out the reason for the failure.

  4. If you included a webhook in the POST Cancel request and the transaction's cancel.status is Success, you can also obtain the transaction result through asynchronous notification, where the eventCode is Cancel. Again, you should check the cancel.status field to determine the transaction result, using the same judgment method as in step 2.