Skip to content

Merchandise Credit

Merchandise Credit

If you want to refund funds without the original payment or after the refund validity period has expired, you need to call the POST Merchandise Credit interface.

The main process is as follows:

  1. When calling the POST Merchandise Credit interface, you need to include, but not limited to, the following parameters. For field details, refer to the API documentation:

    • paymentMethod.type: This indicates the payment method; use card for card transactions.
    • paymentMethod.card: This is a structure containing consumer card information and terminal information. This field is required when paymentMethod.type is card.
    • transAmount: This is a structure that contains the transaction amount and currency.
    • merchantTransInfo: This is a structure that contains the merchant order number.
    • pspInfo: This is a structure that contains card organization qualification information.
  2. Check the merchandiseCredit.status field in the EVO Cloud response. If the value of this field is Success, it indicates that the refund 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 Merchandise Credit to query the transaction result. When you receive the query response, you should also check the merchandiseCredit.status field to determine the transaction result, using the same judgment method as in step 2. If the transaction fails, you need to check merchandiseCredit.failureCode and merchandiseCredit.failureReason to find out the reason for the failure.

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