> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/get-transaction-history.md).

# Get transaction history

## Overview

With the transaction history  you digital wallet application can support:

* Transaction notifications
* Transaction history refresh

{% hint style="warning" %}
During onboarding, confirm that transaction history is enabled for your program.
{% endhint %}

## SDK Integration

### Transaction notification

To support transaction notifications, process **TNS notifications (transactions)** as described in [Handle push notifications](/nfc-wallet-sdk-ios/get-started/configuration/4.-push-notifications/handle-push-notifications.md#process-tns-notifications-transactions).

### Get transactions

`TransactionHistoryService` retrieves both transaction history and transaction notification details from the NFC Wallet backend.

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).

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

```swift
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.
        }
    }
}
```

For co-badged cards, `isAuxiliaryTransaction` indicates whether the record belongs to the auxiliary card.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/implement-nfc-wallet/make-payments/get-transaction-history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
