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

# ODA 証明書を更新する

### 概要

Visaのコンタクトレス決済はオフラインデータ認証（ODA）を使用できます。

各Visaデジタルカードには有効期限付きのODA証明書が含まれます。支払いの中断を避けるため、有効期限が切れる前に証明書を更新してください。

{% hint style="info" %}
NFC Wallet SDKはVisaのみのODA証明書更新をサポートします。
{% endhint %}

### SDK の統合

#### VisaのODA更新が必要か確認する

デジタルカードがVisa ODAをサポートしているか、およびその証明書が期限切れかどうかを確認するには、を取得して `DigitalizedCardDetails` 次を呼び出します:

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

使用する **トークン化されたカードID** をカード識別子として。詳しくは [デジタルカードの表示](/nfc-wallet-sdk-android/ja/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()) {
            // エラーを処理します。
            return;
        }

        DigitalizedCardDetails details = result.getResult();

        // 支払い方式を確認します。
        if (!"VISA".equalsIgnoreCase(details.getScheme())) {
            return;
        }

        // 更新は必要なときだけリクエストします。
        if (details.isVisaODASupported() && details.isVisaODACertificateExpired()) {
            // ODA証明書の更新をリクエストします。
        }
    }
});
```

このチェックを実行してください:

* が完了した後、 **NFCウォレットSDK** 初期化。
* 支払いの後。
* カードがデフォルトに設定された後。
* 接続が復帰した後（オフライン -> オンライン）。

#### ODA証明書を更新する

呼び出す `ProvisioningBusinessService.sendRequestForODACertificateRenewal(...)` を使用してVisaデジタルカードのODA証明書の更新をリクエストします。

1. カード識別子を取得します。

   使用する **トークン化されたカードID**。参照してください [デジタルカードの表示](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/manage-digital-cards/display-digital-cards.md#tokenized-card-id-versus-digital-card-id).
2. ODA証明書更新リクエストを送信します。

   呼び出す `sendRequestForODACertificateRenewal(...)` を呼び出し、次を実装します `PushServiceListener`:

   * `onComplete`：SDKが正常にリクエストを送信します。
   * `onError`： SDKがリクエストを送信できません。を確認してください `ProvisioningServiceError`.

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

ProvisioningBusinessService provisioningService =
        ProvisioningServiceManager.getProvisioningBusinessService();

provisioningService.sendRequestForODACertificateRenewal(
        tokenizedCardId,
        new PushServiceListener() {

            @Override
            public void onComplete() {
                // リクエストは正常に送信されました。
                // NFC Walletバックエンドからのプッシュ通知を期待します。
            }

            @Override
            public void onUnsupportedPushContent(Bundle bundle) {
                // Visa ODA証明書更新では使用されません。
            }

            @Override
            public void onServerMessage(String tokenizedCardId,
                                        ProvisioningServiceMessage message) {
                // 任意: NFC Walletバックエンドからのステータスメッセージを処理します。
            }

            @Override
            public void onError(ProvisioningServiceError error) {
                // エラーを処理します。
            }
        }
);
```

エンドユーザー体験を向上させるため、予測可能なタイミングで更新をトリガーしてください：

* デフォルトカードが設定された後。
* 支払いが完了した後。


---

# 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
