Skip to content

Merchandise Credit

Merchandise Credit

If you want to issue a refund to the shopper without the original payment or after the refund validity period has expired, you need to use the POST Merchandise Credit interface.

The main process is as follows:

  1. When calling the POST Merchandise Credit interface, you must include, but not limited to, the following parameters. For detailed field information, refer to the API documentation:
    • paymentMethod.type:Indicates the payment method. For card transactions, use card.
    • paymentMethod.card: Object contains consumer card information and terminal details. This field is required when paymentMethod.type is card.
    • transAmount:Object contains the transaction amount and currency.
    • merchantTransInfo:Object contains the merchant order number.
    • pspInfo:Object contains card organization qualification information.
Example
js
curl 'https://hkg-online-uat.everonet.com/g2/v0/payment/acq/10130014/evo.offline.merchandiseCredit' \
-H 'Authorization: 4e2420fdb01b5ba61d18db59f25fe1b26e578d28f64f91038183773b872b8322' \
-H 'DateTime: 20240306140435+0800' \
-H 'SignType: SHA256' \
-H 'Content-Type: application/json' \
-H 'MsgID: M20240306140435199' \
-d '{
    "merchantTransInfo": {
        "merchantTransID": "T20240306140435199",
        "merchantTransTime": "2024-03-06T14:04:35+08:00"
    },
    "paymentMethod": {
         "type": "card",
        "card": {
            "posEntryMode":"magnetic",
            "pinFlag":false,
            "termReadability":"5",
            "cardInfo": {
                "cardNumber": "4761340000000043",
                "expiryDate": "2212",
                "track2": "4761340000000043=221220113183086"
            }
        }
    },
    "transAmount": {
        "currency": "HKD",
        "value": "1.00"
    },
    "pspInfo": {
        "mcc": "5499",
        "sponsorCode": "467881",
        "merchantID": "202106305812001",
        "terminalID":"00000001",
        "merchantName": "Test",
        "storeID": "202106305812001",
        "storeName": "Test Store",
        "street": "Test street",
        "city": "SH",
        "postCode": "202000",
        "nation": "MYS"
    }
}'
  1. Check the merchandiseCredit.status field in the EVO Cloud response. If the value is Success, the refund was successful. If not, review the result.code and result.message to review the reason for the failure.

  2. If you do not receive a response from EVO Cloud, you should use the GET Merchandise Credit to query the transaction result. Upon receiving the query response, check the merchandiseCredit.status field to determine the result, using the same method as in step 2. If the transaction failed, review the merchandiseCredit.failureCode and merchandiseCredit.failureReason to understand the failure reason.

  3. If you included a webhook in the POST Merchandise Credit request, you can also receive the transaction result via asynchronous notification. Similarly, use the merchandiseCredit.status field to determine the result, following the same method as in step 2.