Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

  1. Get the corresponding digital card ID.

    See Display digital cards.

  2. Get an access token.

    See Get an access token.

  3. (Optional) Provide the transactionRecordType :

    PRIMARY or AUXILIARY use in co-badged and provided on Handle push notifications.

  4. Call MGTransactionHistoryService.refreshHistory(...) and implement TransactionHistoryListener:

    1. onSuccess

      Triggered when the SDK successfully retrieves transactions. The callback provides a List<MGTransactionRecord>.

      Each MGTransactionRecord represents a transaction record.

    2. onError

      Triggered when the SDK cannot retrieve transaction history. Use MobileGatewayError for error details.

The following code snippet demonstrates how to retrieve the transaction records:

Last updated

Was this helpful?