Get transaction history
Overview
Transaction history lets your digital wallet application support:
Transaction notifications
Refreshing transaction history
SDK integration
Transaction notifications
To support transaction notifications, process TNS notifications (transactions) as described in Handle push notifications.
Retrieve transaction history
MGTransactionHistoryService.refreshHistory(...) retrieves transaction records from the NFC Wallet backend.
If you support co-badged cards, use the overload that accepts transactionRecordType to retrieve primary or auxiliary records.
The transaction record contains the following information:
Transaction ID
Transaction date
Transaction type
Transaction status
Currency code
Amount and display amount
Merchant name
Merchant type
Merchant postal code
Terminal ID
Merchant ID
Primary or auxiliary card indicator (for co-badged cards)
Transaction history limits depend on the payment network:
Time window (for example, transactions from the last 30 days).
Maximum count (for example, the last 10 transactions).
Implementation
To retrieve transaction history for a digital card:
Get the corresponding digital card ID.
Get an access token.
See Get an access token.
(Optional) Provide the
transactionRecordType:PRIMARYorAUXILIARYuse in co-badged and provided on Handle push notifications.Call
MGTransactionHistoryService.refreshHistory(...)and implementTransactionHistoryListener:onSuccessTriggered when the SDK successfully retrieves transactions. The callback provides a
List<MGTransactionRecord>.Each
MGTransactionRecordrepresents a transaction record.onErrorTriggered when the SDK cannot retrieve transaction history. Use
MobileGatewayErrorfor error details.
The following code snippet demonstrates how to retrieve the transaction records:
Last updated
Was this helpful?