> 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/tokenize-a-card/check-card-eligibility.md).

# カードの有効性を確認する

## 概要

カードの有効性確認は、最初のステップです **トークナイゼーション**。カードがトークン化可能かどうかを **デジタルウォレットアプリケーション**.

NFCウォレットSDKは、トークンサービスプロバイダ（TSP）に対して有効性を確認します。

カードが有効な場合、SDKはTSPから利用規約（T\&C）を返します。利用規約を **エンドユーザー** に表示し、デジタル化前に同意を取得してください。

{% hint style="info" %}
プログラムによっては、 **利用規約（T\&C）** は不要な場合があります。
{% endhint %}

有効性確認および（必要な場合の）利用規約の同意の後、次のステップに進んでください [カードをデジタル化する](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/digitize-a-card.md).

## SDK の統合

呼び出す `MGCardEnrollmentService.checkEligibility()` で **トークナイゼーション** 有効性を確認します。

次を提供してください：

* `EligibilityData`
* 次のいずれか：
  * `InstrumentData`
  * `pushSessionId`

`EligibilityData` には次が含まれます：

* `language`：優先言語（例、 `en`).
* `inputMethod`：カード情報の収集方法（例、 **issuer application** または手動入力）。

`InstrumentData` は次から構築できます：

* `encryptedCardData`
* `issuerPushReceipt`

プッシュカード登録ユースケースでは、NFCウォレットのバックエンドが `pushSessionId` を **イシュアのバックエンドが**.

### に返します

カード資格情報で有効性を確認する

```java
ほとんどの場合、カード資格情報を使用して有効性を確認します。PANと有効期限を提供してください。任意でカードセキュリティコード（CSC）を提供できます。
// Enrollment Serviceのハンドラを取得する
        MGCardEnrollmentService enrollmentService =

MobileGatewayManager.INSTANCE.getCardEnrollmentService();
// 暗号化されたカードデータと公開鍵からInstrumentDataを構築する
        InstrumentData instrumentData =
                new InstrumentData.EncryptedCardDataBuilder(encryptedCardInfo)
                .build();

.publicKeyIdentifier(pubKey)
// EligibilityDataを構築する
        EligibilityData eligibilityData =

new EligibilityData.Builder(InputMethod.BANK_APP, "en").build();
// CardEligibilityListenerで有効性を呼び出す
    @Override
    enrollmentService.checkEligibility(eligibilityData, instrumentData, new CardEligibilityListener() {
        public void onSuccess(TermsAndConditions termsAndConditions, IssuerData issuerData) {
        // カードが有効な場合、T&Cを取得する
        String tncContent = termsAndConditions.getContent();

        ContentType tncContentType = termsAndConditions.getContentType();
        // 利用規約を保存して表示する。
    }

    @Override
    // digitizeCard(...) を呼び出す前に同意を収集する。
        public void onError(MobileGatewayError error) {
        // カードは有効ではないか、リクエストが失敗しました。
    }
});
```

### // エラー理由を確認し、再試行するかフローを停止するかを判断してください。

発行者プッシュレシートで有効性を確認する **issuer application**発行者は、 **デジタルウォレットアプリケーション** から登録を開始できます。このフローでは、発行者アプリケーションが発行者プッシュレシートを送信します。 `InstrumentData`.

{% hint style="info" %}
はそれを使用して **を構築します** 発行者プッシュレシートを使用した登録
{% endhint %}

はMastercardのみでサポートされています。NFCウォレットはMDES Token Connect仕様をサポートしています。 `InstrumentData` 発行者プッシュレシートを使用して `を構築します。次に、` checkEligibility(...)

```java
をカード資格情報フローと同様に呼び出します。
final String type = "pushAccountReceipt"; // 定数
final String scheme = "MASTERCARD"; // Mastercard / MDESのみサポート

String payload = "..."; // 発行者アプリから受信したペイロード
// 暗号化されたカードデータと公開鍵からInstrumentDataを構築する
        // 発行者プッシュレシートからInstrumentDataを構築する
```

### new InstrumentData.IssuerPushReceiptBuilder(scheme, type, payload).build();

プッシュカード登録セッションIDで有効性を確認する **イシュアのバックエンドが** アプリケーションで暗号化されたカード詳細を扱わないようにするために、`pushSessionId`).

```java
はカード詳細をNFCウォレットのバックエンドに直接プッシュできます。NFCウォレットのバックエンドは一時的なプッシュカード登録セッションID（
// NFCウォレットのバックエンドが生成したpushSessionIdを取得する

ほとんどの場合、カード資格情報を使用して有効性を確認します。PANと有効期限を提供してください。任意でカードセキュリティコード（CSC）を提供できます。
// Enrollment Serviceのハンドラを取得する
        MGCardEnrollmentService enrollmentService =

String pushSessionId = "....";
// カード有効性を呼び出す
    @Override
    enrollmentService.checkEligibility(eligibilityData, instrumentData, new CardEligibilityListener() {
        public void onSuccess(TermsAndConditions termsAndConditions, IssuerData issuerData) {
        // カードが有効な場合、T&Cを取得する
        String tncContent = termsAndConditions.getContent();

        ContentType tncContentType = termsAndConditions.getContentType();
        // 利用規約を保存して表示する。
    }

    @Override
    // digitizeCard(...) を呼び出す前に同意を収集する。
        public void onError(MobileGatewayError error) {
    }
});
```

### enrollmentService.checkEligibility(eligibilityData, pushSessionId, new CardEligibilityListener() {

利用規約の同意 **エンドユーザー** 有効性確認に成功した後、必要に応じて利用規約（T\&C）を

に提示してください。 `その後、エンドユーザーが同意したら、` TermsAndConditionSession `を作成し、`。参照してください [カードをデジタル化する](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/digitize-a-card.md).

```java
digitizeCard(...)
// 有効性確認から：TermsAndConditionsを取得します。
// termsAndConditions.getContentType() に基づいて termsAndConditions.getContent() をレンダリングします。
// その後、エンドユーザーの同意後：
```

{% hint style="info" %}
The **デジタルウォレットアプリケーション** TermsAndConditionSession tncSession = termsAndConditions.accept();

は利用規約を表示し、（プログラムで要求される場合に）同意を収集する役割を果たします。 `プログラムが黙示的な同意を許可する場合は、次を呼び出すことができます` termsAndConditions.accept() をエンドユーザーの操作なしで呼び出すことができます。
{% endhint %}


---

# 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-wallet-sdk-android/ja/implement-nfc-wallet/tokenize-a-card/check-card-eligibility.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.
