Skip to content

Capture

capture

You can initiate a capture request via the POST Capture API. You can specify the amount you want to complete, but it cannot exceed the original pre-authorization amount.

The main process is as follows:

  1. When initiating capture, use the merchantTransInfo.merchantTransID that you provided when calling the POST Payment API. You need to include this parameter in the URL of the POST Capture request so that EVO Cloud can locate the original pre-authorization transaction and proceed with the completion.
Capture Example
js
curl 'https://hkg-online-uat.everonet.com/g2/v0/payment/acq/10130014/evo.offline.capture/T20240306135818963' \
-H 'Authorization: 899fa642452915a04a698b20f5068b0a48dff5ff2187e602e8f9f85f136d4c5f' \
-H 'DateTime: 20240306140007+0800' \
-H 'SignType: SHA256' \
-H 'Content-Type: application/json' \
-H 'MsgID: M20240306140007152' \
-d '{
    "merchantTransInfo": {
        "merchantTransID": "T20240306140007152",
        "merchantTransTime": "2024-03-06T14:00:07+08:00"
    },
    "paymentMethod": {
        "type": "card",
        "card": {
            "posEntryMode":"magnetic",
            "pinFlag":true,
            "termReadability":"5",
            "cardInfo": {
                "cardNumber": "3569990012318852",
                "expiryDate": "2312",
                "track2": "3569990012318852=23121010000000000000"
            },
            "pin":{
                "encryptedPin":"A8B568E29FC8E959",
                "pinEncryptMethod":"DUKPT",
                "keySerialNumber":"FFFF123456ABCDE00004"
            }
        }
    },
    "transAmount": {
        "currency": "HKD",
        "value": "1.00"
    }
}'
  1. Check the capture.status field in the EVO Cloud response. If the value is Success, the transaction is successful; otherwise, check the result.code and result.message to determine the reason for the failure.
  2. If you do not receive a response from EVO Cloud, you need to call GET Capture to query the transaction result. Upon receiving the response, also check the capture.status field to determine the result, as described in step 2. If the transaction fails, use capture.failureCode and capture.failureReason to find the cause of the failure.
  3. If you included a webhook in your POST Capture request, you can also get the transaction result through asynchronous notifications. Similarly, use the capture.status field to determine the result, as described in step 2.