> 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

## Resumen

La Autenticación de Datos sin Conexión (ODA) puede usar un certificado ODA durante un pago sin contacto Visa.

Para evitar interrupciones en el pago, renueve el certificado ODA antes de que caduque.

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

## Integración del SDK

### Comprobar si se necesita renovación

Use `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 }

// Renovar el certificado.
```

Realice esta comprobación:

* Después **inicialización del SDK de NFC Wallet** .
* Después de un pago.
* Cuando la tarjeta se establece como predeterminada.
* Después de que vuelva la conectividad (offline → online).

### Renovar el certificado ODA

Use `ODARenewalService` para renovar el 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, active la renovación en momentos predecibles:

* Después de que se establezca la tarjeta predeterminada.
* Después de que se haya completado un pago.

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

Puede llamarlo directamente sin una comprobación previa separada.
{% endhint %}

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

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

Establecer `isForced` a `true` para renovar incluso cuando `digitalCard.needsODARenewal` es `false`:

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

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