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:
When calling the
POST Merchandise Creditinterface, 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; usecardfor card transactions.paymentMethod.card: This is a structure containing consumer card information and terminal information. This field is required whenpaymentMethod.typeiscard.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.
Check the
merchandiseCredit.statusfield in the EVO Payment response. If the value of this field isSuccess, it indicates that the refund was successful; otherwise, you need to checkresult.codeandresult.messageto find out the reason for the transaction failure.If you do not receive a response from EVO Payment, you need to call
GET Merchandise Creditto query the transaction result. When you receive the query response, you should also check themerchandiseCredit.statusfield to determine the transaction result, using the same judgment method as in step 2. If the transaction fails, you need to checkmerchandiseCredit.failureCodeandmerchandiseCredit.failureReasonto find out the reason for the failure.If you included a
webhookin thePOST Merchandise Creditrequest and the transaction'smerchandiseCredit.statusisSuccess, you can also obtain the transaction result through asynchronous notification, where theeventCodeisMerchandiseCredit. Again, you should check themerchandiseCredit.statusfield to determine the transaction result, using the same judgment method as in step 2.

