Skip to content

Cancel or Refund

Cancel or Refund

If you are not sure whether the original authorization transaction has been completed, you can call the POST CancelOrRefund interface to refund the funds to the consumer.

Sync Flow:

Async Flow:

The main process is as follows:

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

  2. Check the value of the cancelOrRefund field in the EVO Cloud response:

    1. If cancelOrRefund is Cancel, you need to check the cancel.status field. If the value of this field is Success, it indicates that the cancel was successful; otherwise, check result.code and result.message to find out the reason for the transaction failure.
    2. If cancelOrRefund is Refund, you need to check the refund.status field. If the value of this field is Success, it indicates that the refund was successful; otherwise, 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 CancelOrRefund to query the transaction result. When you receive the query response, you should first determine the value of the cancelOrRefund field, and then check the corresponding xxx.status to determine the transaction result, using the same judgment method as in step 2.

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

TIP

The eventCode for asynchronous notifications from the CancelOrRefund interface is either Cancel or Refund, depending on whether the original authorization transaction was completed.