TransactionContext

public struct TransactionContext : Sendable

The class that contains transaction details.

Since

7.0.0
  • aid

    The application ID (AID) that was used to perform the transaction.

    Declaration

    Swift

    public let aid: String
  • The amount of the transaction according to the currency used based on ISO-4217.

    Example:

    Based on ISO 4217 - ‘E’ denotes how many values are present after decimal points for that currency

    • Japanese Yen - E = 0 - No decimal values
      • Raw Value (rawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x00
      • amount = 5000
    • Euro, IDR and Brazil Real - E = 2 - 2 values after decimal points
      • Raw Value (rawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x65
      • amount = 50.65
    • Jordanian Dinar - E = 3 - 3 values after decimal points
      • Raw Value (rawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65
      • amount = 5.665
    • Unidad de Fomento - E = 4 - 4 values after decimal points
      • Raw Value (rawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65
      • amount = 0.5665

    Declaration

    Swift

    public let amount: Double
  • The raw amount of the transaction regardless of currency.

    Refer to amount for examples.

    Declaration

    Swift

    public let rawAmount: Data
  • The currency of the transaction in BCD-format ISO-4217.

    Declaration

    Swift

    public let currencyCode: Data
  • The date of transaction in BCD format, 3-byte transaction date (year, month, day).

    Declaration

    Swift

    public let transactionDate: Data
  • The transaction type (such as purchase, refund, cash-back).

    This depends on the payment scheme used, which in most cases follow the EMV specification. The possible hexa decimal values according to Specifications:

    • 0x00 for Purchase
    • 0x01 for Withdrawal (manual Cash transactions)
    • 0x02 for Debit Adjustment (for future use)
    • 0x17 for Cash Disbursement
    • 0x20 for Refund/Correction
    • 0x23 Credit Adjustment
    • 0x30 Balance Enquiry
    • 0x40 Account Transfer Normally it should be either 0x00 or 0x20 for Mobile Wallet usecases.

    Declaration

    Swift

    public let transactionType: Data
  • The digital card ID used in transaction.

    Declaration

    Swift

    public let digitalCardID: String
  • The scheme of the card used for performing the payment.

    Declaration

    Swift

    public let scheme: DigitalCard.Scheme
  • Indicates if it is a transit transaction. Currently this flag only applies to MasterCard.

    Declaration

    Swift

    public let isTransit: Bool
  • A unique ID for identifying the transaction.

    Declaration

    Swift

    public let transactionID: String