> 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/tokenize-a-card/digitize-card.md).

# Digitalizar tarjeta

## Descripción general

Después de que la tarjeta supere las comprobaciones de elegibilidad y el usuario final acepte los términos y condiciones (T\&C), inicie la digitalización.

Durante la digitalización:

* El backend del emisor devuelve la **Tokenización** decisión: flujo verde, flujo amarillo o flujo rojo.
* Si el emisor aprueba (flujo verde o flujo amarillo):
  * El TSP crea la tarjeta digital y sus activos (perfil y claves de pago).
  * El SDK de NFC Wallet aprovisiona de forma segura el perfil de la tarjeta digital y las claves de pago en la aplicación de cartera digital.

En el flujo amarillo, la aplicación de cartera digital realiza ID\&V (autenticación escalonada).

Implemente el flujo verde, el flujo amarillo o ambos. Elija según su programa.

{% hint style="info" %}
Según su programa, **T\&C** puede no ser necesario. Si es así, la aplicación de cartera digital puede aceptar los T\&C sin interacción del usuario final.
{% endhint %}

## Integración del SDK

Inicie **Tokenización** llamando a `CardDigitizationService.digitizeCard()`.

Siga el progreso escuchando `CardDigitizationService.eventStream`.

Gestione el resultado en función del estado emitido:

* **Flujo verde (aprobado, sin paso adicional)**: `.digitizationApproved`
  * Para conocer los pasos detallados de integración del SDK, consulte [Digitalización de flujo verde](/nfc-wallet-sdk-ios/es/implement-nfc-wallet/tokenize-a-card/digitize-card/green-flow-digitization.md).
* **Flujo amarillo (aprobado con autenticación adicional)**: `.digitizationApprovedWithIDV`
  * Para conocer los pasos detallados de integración del SDK, consulte [Digitalización de flujo amarillo](/nfc-wallet-sdk-ios/es/implement-nfc-wallet/tokenize-a-card/digitize-card/yellow-flow-digitization.md).
* **Flujo rojo (rechazado)**: `.digitizationDeclined`
  * [Gestionar flujo rojo](/nfc-wallet-sdk-ios/es/implement-nfc-wallet/tokenize-a-card/digitize-card/handle-red-flow.md)

### Gestionar errores de tokenización

El `CardDigitizationService.digitizeCard()` la llamada puede generar un error durante la tokenización.

Gestione estos tipos de error:

* `clientError`: Gestione un error local en el SDK de NFC Wallet.
* `serverError`: Gestione un error devuelto por el servicio.
* `networkError`: Gestione la ausencia de conexión a Internet en el dispositivo.


---

# 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/tokenize-a-card/digitize-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.
