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

# カードをデジタル化する

## 概要

カードが有効性チェックに合格し、エンドユーザーが利用規約（T\&C）に同意したら、デジタル化を開始します。

デジタル化中:

* イシュアのバックエンドが次を返します **トークン化** 判定: グリーンフロー、イエローフロー、またはレッドフロー。
* イシュアが承認した場合（グリーンフローまたはイエローフロー）:
  * TSP がデジタルカードとそのアセット（プロファイルおよび支払いキー）を作成します。
  * NFC Wallet SDK は、デジタルウォレットアプリケーションにデジタルカードのプロファイルと支払いキーを安全にプロビジョニングします。

イエローフローでは、デジタルウォレットアプリケーションが ID\&V（ステップアップ認証）を実行します。

グリーンフロー、イエローフロー、またはその両方を実装します。プログラムに応じて選択してください。

{% hint style="info" %}
プログラムによっては、 **利用規約（T\&C）** 必須ではない場合があります。その場合、デジタルウォレットアプリケーションはエンドユーザーの操作なしで T\&C を受け入れることができます。
{% endhint %}

## SDK 統合

開始 **トークン化** を呼び出して `CardDigitizationService.digitizeCard()`.

をリッスンして進捗を追跡します `CardDigitizationService.eventStream`.

生成された状態に基づいて結果を処理します:

* **グリーンフロー（承認済み、ステップアップなし）**: `.digitizationApproved`
  * 詳細な SDK 統合手順については、次を参照してください [グリーンフローのデジタル化](/nfc-wallet-sdk-ios/ja/implement-nfc-wallet/tokenize-a-card/digitize-card/green-flow-digitization.md).
* **イエローフロー（ステップアップ付きで承認済み）**: `.digitizationApprovedWithIDV`
  * 詳細な SDK 統合手順については、次を参照してください [イエローフローのデジタル化](/nfc-wallet-sdk-ios/ja/implement-nfc-wallet/tokenize-a-card/digitize-card/yellow-flow-digitization.md).
* **レッドフロー（否認）**: `.digitizationDeclined`
  * [レッドフローを処理する](/nfc-wallet-sdk-ios/ja/implement-nfc-wallet/tokenize-a-card/digitize-card/handle-red-flow.md)

### トークン化エラーを処理する

この `CardDigitizationService.digitizeCard()` 呼び出しは、トークン化中にエラーをスローする場合があります。

次のエラータイプを処理します:

* `clientError`: NFC Wallet SDK 内のローカルエラーを処理します。
* `serverError`: サービスから返されたエラーを処理します。
* `networkError`: デバイスのインターネット接続がない場合のエラーを処理します。


---

# 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/ja/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.
