> 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](/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](/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 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/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.
