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.

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.

Retrieve transaction history

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

SDK

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

Last updated

Was this helpful?