> 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-replenishment/replenish-oda.md).

# Replenish ODA

### Overview

Offline Data Authentication (ODA) is supported in the D1 SDK module. It is a mechanism to authenticate the end user during transit at the gates. For example, during usage of digitized card to pay at the gates of public transport stations.

In order to complete a Visa transaction which requires ODA, the issuer application must check the expiry date of Visa ODA certificate as described in the following sections.

To support this use case, two methods are available:

* `isOdaReplenishmentNeeded()` to check if ODA is needed. For more information, refer to [Digital Card List](https://thales-dis-dbp.stoplight.io/docs/d1-caas/digital-card-list.md)
* `replenishODA()` to request for ODA replenishment.

{% hint style="info" %}
This use case is to be implemented during the issuer application startup flow after D1 Pay SDK initialization and before attempting to show the list of all the cards.
{% endhint %}

### SDK

The code snippet below highlights the Visa ODA Replenishment.

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

```java
D1PayWallet d1PayWallet = d1Task.getD1PayWallet();
String d1CardID = "";
D1PayDigitalCard[] dCards = new D1PayDigitalCard[]{ null };
d1PayWallet.getDigitalCard(d1CardID,
    new D1Task.Callback<D1PayDigitalCard>() {
        @Override
        public void onSuccess(@NonNull D1PayDigitalCard digitalCard) {
            dCards[0] = digitalCard;
        }

        @Override
        public void onError(@NonNull D1Exception exception) {
            ///Refer to D1 SDK Integration – Error Management section
        }
    }
);
// wait for the getDigitalCard to complete

D1PayDigitalCard d1PayDigitalCard = dCards[0];
if (d1PayDigitalCard.isODAReplenishmentNeeded()) {
    d1PayWallet.replenishODA(d1CardID,
        new D1Task.Callback<Void>() {
            @Override
            public void onSuccess(Void data) {
                // VISA ODA Replenishment Success
            }

            @Override
            public void onError(@NonNull D1Exception exception) {
                // Refer to D1 SDK Integration – Error Management section
            }
        }
    );
}
```

{% 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-replenishment/replenish-oda.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.
