Pre-Auth
A Pre-Authorisation (Pre-auth) Transaction API is used to reserve funds on a customer’s card before the final transaction is completed. This is common in industries like hospitality, fuel, and e-commerce where the final amount may not be known upfront. Here's what it does:
Key Parameters:
MsgType.PRE_AUTH: Indicates a pre-authorization.
What a Pre-auth Transaction API Does
1
Initiates a Hold on Funds
It sends a request to the payment gateway to temporarily reserve a specified amount on the customer’s card without actually capturing it. This ensures the customer has sufficient funds.
2
Captures Card Details Securely
It transmits card data (or tokenised equivalent) using secure protocols, often requiring PIN or authentication depending on the card type.
3
Returns Authorisation Code
If approved, the gateway responds with an authorisation code and a transaction ID, which are used later to complete or void the transaction.
4
Delays Settlement
Unlike a sale transaction, the funds are not transferred immediately. The merchant must send a completion (capture) request to finalise the transaction.
5
Handles Reversal
If the transaction is not completed within a set time, the API reverses the transaction
6
Improves Risk Management
It reduces the risk of declined payments at the time of final billing and helps merchants manage cash flow and inventory more effectively.
Disclaimers / Consent
The app/merchant should allow for the display of disclaimers/collect consent whenever applicable. eg. during Tokenization.
If requesting a token for a cardholder, you need to ensure the merchant collects consent from the customer to allow the merchant to store the card token information and to perform future transactions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Button.onClick {
val parsedAmount = parseAmount(amount) ?: return@onClick
val requestMsg = RequestMsg(
msgType = MsgType.PRE_AUTH,
invoiceNbr = "10120304",
amount = 1500, // $15.00
currency = "USD",
readerType = ReaderType.INSERT_CLESS_SWIPE
tokenReq = true,
agreementID = "MERCH123_20250804_001",
agreementType = "I"
)
sdk.sendRequestMessage(requestMsg)
}