Skip to main content

Transaction Request/Response Models

The data models below define the structure for payment transactions. Use StartTransactionRequest to send payment requests and parse StartTransactionResponse to handle results from the Paynt app.


StartTransactionRequest

data class StartTransactionRequest(
val transType: StartTransactionType,
val uti: String, // UUID (reversal, completion)
val amountTrans: Int, // Amount in cents (e.g., 1250 = €12.50)
val printEnabled: Boolean = true, // Enable receipt printing
val reference: String = "" // Optional reference for acquirer
)

StartTransactionResponse

data class StartTransactionResponse(
val appName: String?, // Application name on card
val applicationId: String?, // AID
val authCode: String?, // Authorization code
val cardholderReceipt: List<List<String>>?, // Customer receipt lines
val cardholderVerificationMethod: String?, // CVM method used
val currencyCode: String?, // ISO currency code
val merchantId: String?, // Merchant identifier
val merchantReceipt: List<List<String>>?, // Merchant receipt lines
val messageId: Int?, // Transaction message ID
val primaryAccountNumber: String?, // Masked PAN
val signature: Boolean?, // Signature required
val terminalId: String?, // Terminal identifier
val transAmount: Int?, // Transaction amount in cents
val transactionDate: String?, // Transaction timestamp
val transApproved: Boolean?, // Transaction approved status
val transCancelled: Boolean?, // Transaction cancelled by user
val transactionResponse: String?, // Response code (acquirer specific)
val transactionSource: String?, // Source: ICC/PICC/MAG/MANUAL/NONE
val transactionType: StartTransactionType?, // Transaction type
val voided: Boolean?, // Voided transaction flag
val uti: String?, // Current transaction UTI
val originalUti: String? // Linked transaction UTI (Reversal/Completion)
)

StartTransactionType

enum class StartTransactionType {
SALE, REFUND, REVERSAL, PREAUTH, COMPLETION, UNKNOWN
}