> 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-android/implement-nfc-wallet/make-payment/renew-oda-certificates.md).

# Renew ODA certificates

### Overview

Visa contactless payments can use Offline Data Authentication (ODA).

Each Visa digital card includes an ODA certificate with an expiry date. Renew the certificate before it expires to avoid payment interruptions.

{% hint style="info" %}
The NFC Wallet SDK supports ODA certificate renewal for Visa only.
{% endhint %}

### SDK integration

#### Check whether Visa ODA renewal is needed

To check whether a digital card supports Visa ODA and whether its certificate has expired, retrieve `DigitalizedCardDetails` and call:

* `DigitalizedCardDetails.isVisaODASupported()`
* `DigitalizedCardDetails.isVisaODACertificateExpired()`

Use the **tokenized card ID** as the card identifier. See [Display digital cards](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/implement-nfc-wallet/manage-digital-cards/display-digital-cards.md#tokenized-card-id-versus-digital-card-id).

```java
String tokenizedCardId = "...";

DigitalizedCard card =
        DigitalizedCardManager.getDigitalizedCard(tokenizedCardId);

card.getCardDetails(new AbstractAsyncHandler<DigitalizedCardDetails>() {
    
    @Override
    public void onComplete(AsyncResult<DigitalizedCardDetails> result) {
        if (!result.isSuccessful()) {
            // Handle error.
            return;
        }

        DigitalizedCardDetails details = result.getResult();

        // Check the payment scheme.
        if (!"VISA".equalsIgnoreCase(details.getScheme())) {
            return;
        }

        // Request renewal only when needed.
        if (details.isVisaODASupported() && details.isVisaODACertificateExpired()) {
            // Request the ODA certificate renewal.
        }
    }
});
```

Perform this check:

* After **NFC Wallet SDK** initialization.
* After a payment.
* After the card is set as default.
* After connectivity returns (offline -> online).

#### Renew the ODA certificate

Call `ProvisioningBusinessService.sendRequestForODACertificateRenewal(...)` to request renewal of a Visa digital card ODA certificate.

1. Get the card identifier.

   Use the **tokenized card ID**. See [Display digital cards](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/implement-nfc-wallet/manage-digital-cards/display-digital-cards.md#tokenized-card-id-versus-digital-card-id).
2. Send the ODA certificate renewal request.

   Call `sendRequestForODACertificateRenewal(...)` and implement `PushServiceListener`:

   * `onComplete`: The SDK sends the request successfully.
   * `onError`: The SDK cannot send the request. Inspect `ProvisioningServiceError`.

```java
String tokenizedCardId = "...";

ProvisioningBusinessService provisioningService =
        ProvisioningServiceManager.getProvisioningBusinessService();

provisioningService.sendRequestForODACertificateRenewal(
        tokenizedCardId,
        new PushServiceListener() {

            @Override
            public void onComplete() {
                // The request was sent successfully.
                // Expect a push notification from the NFC Wallet backend.
            }

            @Override
            public void onUnsupportedPushContent(Bundle bundle) {
                // Not used for Visa ODA certificate renewal.
            }

            @Override
            public void onServerMessage(String tokenizedCardId,
                                        ProvisioningServiceMessage message) {
                // Optional: handle status messages from the NFC Wallet backend.
            }

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

To improve the end user experience, trigger renewal at predictable moments:

* After the default card is set.
* After a payment completes.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/implement-nfc-wallet/make-payment/renew-oda-certificates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
