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

# Set the default payment card

## Overview

The default digital card is the card your **digital wallet application** selects automatically for contactless payments.

The **end user** can keep the default digital card or switch cards in your UI before confirming the payment.

See [Implement contactless payments](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/implement-nfc-wallet/make-payment/implement-contactless-payments.md).

## SDK integration

### Set the default payment card

Call `DigitalizedCard.setDefault()` on the `DigitalizedCard` you want to set as the default.

{% hint style="warning" %}
Before you set a digital card as the default, confirm it is active and has at least one payment remaining (payment key). Use the card status and payment key status fields in [Display digital cards](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/implement-nfc-wallet/manage-digital-cards/display-digital-cards.md#retrieve-digital-card-information) to validate both.

* Call `DigitalizedCardStatus.getState()` to verify the card state.
* Call `DigitalizedCardStatus.getNumberOfPaymentsLeft()` to check remaining payments.
  {% endhint %}

The example below sets the default digital card for contactless payments.

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

```java
public void setDefault(final DigitalizedCard digitalizedCard) {
    digitalizedCard.setDefault(
        PaymentType.CONTACTLESS,
        new AsyncHandlerVoid(new AsyncHandlerVoid.Delegate() {
            @Override
            public void onSuccess() {
                // Default card successfully set.
            }

            @Override
            public void onError(final String error) {
                // TODO: handle error
            }
        })
    );
}
```

{% endcode %}

### `DigitalizedCardManager` for default card management

`DigitalizedCardManager` provides additional APIs for default card management:

* `DigitalizedCardManager.getDefault()`: Retrieve the **tokenized card ID** for the default card.
* `DigitalizedCardManager.unsetDefaultCard()`: Unset the current default card. After that, no card is selected by default.


---

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