> 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-payment/implement-nfc-payment/support-transaction-history.md).

# Support transaction history

### Overview

The issuer application can show past payment transactions for a digital card.

After a payment completes, the issuer application receives a transaction notification. It forwards that notification to the D1 SDK, then retrieves the transaction history for the card.

### Flow

#### Handle transaction notifications

After a transaction completes, the issuer application receives a transaction push notification.

Forward the message to the D1 SDK. If processing succeeds, the D1 SDK returns `PushResponseKey.TYPE_TRANSACTION_NOTIFICATION` with the `cardId` and `lastCallTimestamp`.

The issuer application can then refresh the transaction history for that card.

For notification payload handling details, see [Message handling](/nfc-payment/integrate-d1-sdk/getting-started/configuration/4.-push-notifications/message-handling.md).

#### Retrieve transaction history

Call `getTransactionHistory()` to retrieve the payment history for a card.

{% hint style="warning" %}
The card must already be digitized before the issuer application calls `getTransactionHistory()`.
{% endhint %}

### SDK

{% tabs %}
{% tab title="Android Kotlin" %}

```kotlin
fun getTransactionHistory(d1Task: D1Task, cardId: String) {
    val d1PayWallet: D1PayWallet = d1Task.d1PayWallet
    d1PayWallet.getTransactionHistory(cardId,
        object : D1Task.Callback<TransactionHistory?> {
            override fun onSuccess(data: TransactionHistory?) {
                // Update the UI, for example by showing the transaction history list.
            }

            override fun onError(exception: D1Exception) {
                // Handle the error.
            }
        }
    )
}
```

{% endtab %}

{% tab title="Android Java" %}

```java
public void getTransactionHistory(@NonNull D1Task d1Task, @NonNull String cardId) {
    D1PayWallet d1PayWallet = d1Task.getD1PayWallet();
    d1PayWallet.getTransactionHistory(cardId,
        new D1Task.Callback<TransactionHistory>() {
            @Override
            public void onSuccess(@Nullable TransactionHistory data) {
                // Update the UI, for example by showing the transaction history list.
            }

            @Override
            public void onError(@NonNull D1Exception exception) {
                // Handle the error.
            }
        }
    );
}
```

{% endtab %}
{% endtabs %}


---

# 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-payment/implement-nfc-payment/support-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.
