> 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 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-ios/es/implement-nfc-wallet/make-payments/renew-oda-certificates.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.
