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

# Digitize card

## Overview

After the card passes eligibility checks and the end user accepts the terms and conditions (T\&C), start digitization.

During the digitization:

* The issuer backend returns the **Tokenization** decision: green flow, yellow flow, or red flow.
* If the issuer approves (green flow or yellow flow):
  * The TSP creates the digital card and its assets (profile and payment keys).
  * The NFC Wallet SDK securely provisions the digital card profile and payment keys in the digital wallet application.

In the yellow flow, the digital wallet application performs ID\&V (step-up authentication).

Implement the green flow, the yellow flow, or both. Choose based on your program.

{% hint style="info" %}
Depending on your program, **T\&C** might not be required. If so, the digital wallet application can accept the T\&C without end user interaction.
{% endhint %}

## SDK integration

Start **Tokenization** by calling `CardDigitizationService.digitizeCard()`.

Track progress by listening to `CardDigitizationService.eventStream`.

Handle the outcome based on the emitted state:

* **Green flow (approved, no step-up)**: `.digitizationApproved`
  * For detailed SDK integration steps, see [Green flow digitization](https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/implement-nfc-wallet/tokenize-a-card/digitize-card/green-flow-digitization.md).
* **Yellow flow (approved with step-up)**: `.digitizationApprovedWithIDV`
  * For detailed SDK integration steps, see [Yellow flow digitization](https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/implement-nfc-wallet/tokenize-a-card/digitize-card/yellow-flow-digitization.md).
* **Red flow (declined)**: `.digitizationDeclined`
  * [Handle red flow](https://docs.payments.thalescloud.io/nfc-wallet-sdk-ios/implement-nfc-wallet/tokenize-a-card/digitize-card/handle-red-flow.md)

### Handle Tokenization errors

The `CardDigitizationService.digitizeCard()` call may throw an error during Tokenization.

Handle these error types:

* `clientError`: Handle a local error in the NFC Wallet SDK.
* `serverError`: Handle an error returned by the service.
* `networkError`: Handle a missing internet connection on the device.


---

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