Get transaction history
Last updated
Was this helpful?
Was this helpful?
func transactionHistory() async {
do {
let historyService = TransactionHistoryService()
let records = try await historyService.records(forDigitalCardID: "DIGITAL_CARD_ID")
for record in records {
// Display record fields in your UI.
_ = record.id
_ = record.date
_ = record.status
_ = record.type
_ = record.currencyCode
_ = record.amount
_ = record.displayAmount
_ = record.merchantName
_ = record.merchantType
_ = record.merchantPostalCode
_ = record.terminalID
_ = record.merchantID
_ = record.isAuxiliaryTransaction
}
} catch {
if let error = error as? TransactionHistoryService.Error {
// Handle the error.
}
}
}