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 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; usecard
for card transactions.paymentMethod.card
: This is a structure containing consumer card information and terminal information. This field is required whenpaymentMethod.type
iscard
.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.status
field in the EVO Cloud response. If the value of this field isSuccess
, it indicates that the refund was successful; otherwise, you need to checkresult.code
andresult.message
to find out the reason for the transaction failure.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 themerchandiseCredit.status
field to determine the transaction result, using the same judgment method as in step 2. If the transaction fails, you need to checkmerchandiseCredit.failureCode
andmerchandiseCredit.failureReason
to find out the reason for the failure.If you included a
webhook
in thePOST Merchandise Credit
request and the transaction'smerchandiseCredit.status
isSuccess
, you can also obtain the transaction result through asynchronous notification, where theeventCode
isMerchandiseCredit
. Again, you should check themerchandiseCredit.status
field to determine the transaction result, using the same judgment method as in step 2.