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 Payment only supports completing the pre-authorization for amounts less than or equal to the pre-authorization amount.
- When calling the
Paymentinterface, 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; usecardfor card transactions.paymentMethod.card: A structure containing consumer card information and terminal details, required whenpaymentMethod.typeiscard.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.statusfield in the EVO Payment response. If the value isAuthorised, the transaction was successful; otherwise, checkresult.codeandresult.messagefor the reason for the transaction failure.If you do not receive a response message from EVO Payment, you need to call
GET Paymentto query the transaction result. Upon receiving the query response, evaluate the transaction result using thepayment.statusfield as in step 2. If the transaction failed, refer topayment.failureCodeandpayment.failureReasonfor details on the failure.If you included a
webhookin yourPOST Paymentrequest, you can also obtain the transaction result through asynchronous notification. Again, assess the transaction result using thepayment.statusfield as in step 2.Present the payment result to the consumer.

