Pre-authorization
Pre-authorization
You can initiate a pre-authorization transaction by setting the value of autoCapture
to false
in the POST Payment
request. Subsequently, you can complete the pre-authorization based on the actual transaction amount from the consumer by making a POST Capture
request. Please note that EVO Cloud only supports completing the pre-authorization for amounts less than or equal to the pre-authorization amount.
- When calling the
Payment
interface, you need to include, but are not limited to, the following parameters. For field details, refer to the API documentation:autoCapture
: Fixed valuefalse
, indicating pre-authorization.paymentMethod.type
: Indicates the payment method; usecard
for card transactions.paymentMethod.card
: A structure containing consumer card information and terminal details, required whenpaymentMethod.type
iscard
.transAmount
: A structure containing the transaction amount and currency.merchantTransInfo
: A structure containing the merchant order number.pspInfo
: A structure containing card organization qualification information.
Pre-Authorization Sample
curl 'https://hkg-online-uat.everonet.com/g2/v0/payment/acq/10130014/evo.offline.payment' \
-H 'Authorization: ce7bfb5b8e015954ea2f64f99e4973520ddb40d098ce3c76c946338663b95906' \
-H 'DateTime: 20240306115720+0800' \
-H 'SignType: SHA256' \
-H 'Content-Type: application/json' \
-H 'MsgID: M20240306115720557' \
-d '{
"merchantTransInfo": {
"merchantTransID": "T20240306115720557",
"merchantTransTime": "2024-03-06T11:57:20+08:00"
},
"paymentMethod": {
"type": "card",
"card": {
"posEntryMode":"manual",
"pinFlag":false,
"termReadability":"5",
"cardInfo": {
"cardNumber": "4761340000000043"
}
}
},
"transAmount": {
"currency":"HKD",
"value":"1.00"
},
"autoCapture": false,
"pspInfo": {
"mcc": "5499",
"sponsorCode": "441378",
"merchantID": "202106305812001",
"terminalID":"00000001",
"merchantName": "Test",
"storeID": "202106305812001",
"storeName": "Test Store",
"street": "Test street",
"city": "MYS",
"postCode": "202000",
"nation": "MYS"
}
}'
Check the
payment.status
field in the EVO Cloud response. If the value isAuthorised
, the transaction was successful; otherwise, checkresult.code
andresult.message
for the reason for the transaction failure.If you do not receive a response message from EVO Cloud, you need to call
GET Payment
to query the transaction result. Upon receiving the query response, evaluate the transaction result using thepayment.status
field as in step 2. If the transaction failed, refer topayment.failureCode
andpayment.failureReason
for details on the failure.If you included a
webhook
in yourPOST Payment
request, you can also obtain the transaction result through asynchronous notification. Again, assess the transaction result using thepayment.status
field as in step 2.Present the payment result to the consumer.