> 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/manage-digital-cards/set-the-default-payment-card.md).

# 既定の支払いカードを設定する

## 概要

デフォルトのデジタルカードは、あなたの **デジタルウォレットアプリケーション** 非接触決済用に自動的に選択するカードです。

この **エンドユーザー** 支払いを確定する前に、UIでデフォルトのデジタルカードをそのままにするか、別のカードに切り替えることができます。

参照 [非接触決済を実装する](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/make-payment/implement-contactless-payments.md).

## SDK 連携

### デフォルトの支払いカードを設定する

呼び出します `DigitalizedCard.setDefault()` 〜上で `DigitalizedCard` デフォルトに設定したいカード。

{% hint style="warning" %}
デジタルカードをデフォルトに設定する前に、それが有効であり、少なくとも1回の支払い残高（payment key）を持っていることを確認してください。カードの状態とpayment keyの状態フィールドを [デジタルカードを表示する](/nfc-wallet-sdk-android/ja/implement-nfc-wallet/manage-digital-cards/display-digital-cards.md#retrieve-digital-card-information) 両方を検証するために使用します。

* 呼び出します `DigitalizedCardStatus.getState()` カードの状態を確認するために
* 呼び出します `DigitalizedCardStatus.getNumberOfPaymentsLeft()` 残りの支払い回数を確認するために
  {% endhint %}

以下の例では、非接触決済用のデフォルトのデジタルカードを設定します。

{% code title="SetDefaultCard.java" %}

```java
public void setDefault(final DigitalizedCard digitalizedCard) {
    digitalizedCard.setDefault(
        PaymentType.CONTACTLESS,
        new AsyncHandlerVoid(new AsyncHandlerVoid.Delegate() {
            @Override
            public void onSuccess() {
                // デフォルトカードの設定に成功しました。
            }

            @Override
            public void onError(final String error) {
                // TODO: エラー処理
            }
        })
    );
}
```

{% endcode %}

### `DigitalizedCardManager` デフォルトカード管理用

`DigitalizedCardManager` デフォルトカード管理用の追加APIを提供します：

* `DigitalizedCardManager.getDefault()`：取得する **トークン化カード ID** デフォルトカードの
* `DigitalizedCardManager.unsetDefaultCard()`：現在のデフォルトカードを解除します。その後は、デフォルトで選択されるカードはありません。


---

# 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/manage-digital-cards/set-the-default-payment-card.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.
