TransactionResult

The outcome of the transaction.

Copy
Copied
data class TransactionResult(
    val status: TransactionStatus,
    val detail: TransactionDetail? = null,
    val errorMessage: String? = null
)

Parameters

status
required
TransactionStatus

The status of the transaction.

Enum: "TXN_SUCCESS" "TXN_DECLINED" "TXN_FAILED" "TXN_NO_APP_ERROR" "TXN_FAILED_ALLOW_FALLBACK" "TXN_CARD_EXPIRED" "TXN_ONLINE_ERROR" "TXN_CANCELLED" "TXN_TIMEOUT" "TXN_CARD_ERROR" "TXN_REQUIRE_CDCVM" "TXN_PERMISSIONS_ERROR" "TXN_VERIFY_CONNECTION_SERVER_ERROR" "TXN_VERIFY_CONNECTION_TYRO_ERROR" "TXN_VERIFY_CONNECTION_REJECTED" "TXN_UNKNOWN_ERROR"
detail
TransactionDetail

The details of the transaction.

errorMessage
String

The error message if available.

TransactionDetail

Information about the transaction.

statusCode
String

The status code of the transaction.

Enum: "APPROVED" "REVERSED" "DECLINED"
statusMessage
String

The status message of the transaction.

amount
String

The total authorised transaction amount in cents.

surcharge
String

The surcharge amount in cents, it will be null if surcharge is not supported.

approvalCode
String
transactionID
String
reference
String

Unique reference number of the transaction.

elidedPan
String

The elided string representing the PAN for the card used in the transaction. The last 4 digits are available

cardType
String

The type of card used in the transaction

Enum: "Visa Credit" "MasterCard Credit" "Amex" "JCB" "UnionPay" "Diners" "TPN" "VCCS (NAPAS)" "Discover" "EFTPOS" "Visa Debit" "MasterCard Debit"
mid
String

The merchant identifier (MID) of the transaction.

tid
String

The terminal identifier (TID) of the transaction.

retrievalReferenceNumber
String
transactionReference
String
transactionDate
String
transactionTime
String
customerReceipt
String
Copyright © Tyro Payments 2019-2024. All right reserved.