Skip to main content

Process a Sale

This guide shows you how to process an immediate payment using App2App integration.


Complete Sale Transaction

// Sale for €25.00
startPaymentTransaction(
type = StartTransactionType.SALE,
amountInCents = 2500,
uniqueTransactionId = "",
enablePrinting = true
)

Parameters

ParameterValueDescription
typeStartTransactionType.SALETransaction type
amountInCents2500Amount in cents (€25.00)
uniqueTransactionId""Leave empty for sales
enablePrintingtrueEnable receipt printing

Amount Format

Always pass amounts in cents/minor currency units (e.g., 1250 = €12.50).


Handle the Response

private fun processPaymentResponse(response: StartTransactionResponse) {
if (response.transApproved == true) {
val authCode = response.authCode
val maskedPan = response.primaryAccountNumber
val amount = response.transAmount // Amount in cents
// Handle success
} else {
val errorCode = response.transactionResponse
// Handle failure
}
}