> 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-ios/es/implement-nfc-wallet/manage-digital-cards/set-default-payment-card.md).

# Establecer la tarjeta de pago predeterminada

## Resumen

La tarjeta digital predeterminada es la tarjeta que su **aplicación de billetera digital** muestra primero durante el pago sin contacto.

El usuario final puede conservar la tarjeta digital predeterminada o cambiar de tarjeta desde su interfaz antes de confirmar el pago.

Para opciones de UX de pago, consulte [Pago sin contacto](/nfc-wallet-sdk-ios/es/implement-nfc-wallet/make-payments/implement-contactless-payment.md).

### Integración del SDK

Llame a `DigitalCard.setDefault()` en el `DigitalCard` que desea establecer como predeterminado.

El siguiente ejemplo establece la tarjeta digital predeterminada:

{% code title="Establecer tarjeta predeterminada" %}

```swift
func setDefaultCard(digitalCard: DigitalCard) async {
  do {
    _ = try await digitalCard.setDefault()
  } catch {
    // Manejar errores.
  }
}
```

{% endcode %}

{% hint style="info" %}
Puede establecer una tarjeta digital como predeterminada solo cuando está activa.

La tarjeta también debe tener al menos una clave de pago restante.

Use las propiedades en [Obtener detalles de la tarjeta](/nfc-wallet-sdk-ios/es/implement-nfc-wallet/manage-digital-cards/display-digital-cards.md#get-card-details) para validar ambas.
{% 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-ios/es/implement-nfc-wallet/manage-digital-cards/set-default-payment-card.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.
