> 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/make-payments/renew-oda-certificates.md).

# Renovar certificados ODA

## Descripción general

La autenticación de datos sin conexión (ODA) puede usar un certificado ODA durante un pago sin contacto de Visa.

Para evitar interrupciones en los pagos, renueva el certificado ODA antes de que caduque.

{% hint style="info" %}
El SDK de NFC Wallet admite la renovación del certificado ODA solo para Visa.
{% endhint %}

## Integración del SDK

### Comprueba si es necesario renovar

Usar `DigitalCard` para comprobar si una tarjeta digital admite ODA y si su certificado ha caducado:

* `DigitalCard.isODASupported: Bool`
* `DigitalCard.needsODARenewal: Bool`

```swift
guard let digitalCard = await digitalCardManager.digitalCard(forID: digitalCardID) else { return }
let isODASupported = await digitalCard.isODASupported
let needsODARenewal = await digitalCard.needsODARenewal

guard isODASupported else { return }
guard needsODARenewal else { return }

// Renueva el certificado.
```

Realiza esta comprobación:

* Después de **SDK de NFC Wallet** inicialización.
* Después de un pago.
* Cuando la tarjeta se establece como predeterminada.
* Después de que se recupere la conectividad (sin conexión → en línea).

### Renovar el certificado ODA

Usar `ODARenewalService` para renovar un certificado ODA de una tarjeta digital Visa:

* `ODARenewalService.renewIfNeeded(digitalCardID: String, isForced: Bool)`

```swift
try await odaRenewalService.renewIfNeeded(digitalCardID: digitalCard.digitalCardID)
```

Para mejorar la experiencia del usuario final, activa la renovación en momentos predecibles:

* Después de establecer la tarjeta predeterminada.
* Después de completar un pago.

{% hint style="info" %}
`renewIfNeeded()` comprueba ambos `digitalCard.isODASupported` y `digitalCard.needsODARenewal`.

Puedes llamarlo directamente sin una comprobación previa independiente.
{% endhint %}

{% hint style="warning" %}
`renewIfNeeded()` no hace nada si:

* El `digitalCard` no es una tarjeta Visa.
* `digitalCard.isODASupported` es `falso`.
* `digitalCard.needsODARenewal` es `falso`.

Establece `isForced` en `true` para renovarlo incluso cuando `digitalCard.needsODARenewal` es `falso`:

```swift
try await odaRenewalService.renewIfNeeded(
    digitalCardID: digitalCard.digitalCardID,
    isForced: true
)
```

El valor predeterminado para `isForced` es `falso`.
{% 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 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-ios/es/implement-nfc-wallet/make-payments/renew-oda-certificates.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.
