> 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/green-flow-digitization.md).

# グリーンフローのデジタル化

## 概要

Green flow は、イシュアのバックエンドがステップアップ認証なしでトークナイゼーションを承認するトークナイゼーションフローです。

このフローは、NFC Wallet SDK がイシュアアプリに統合されており、エンドユーザーがすでにアプリ内で認証済みの場合によく見られます。

## ユーザー体験

参照 [Green flow のユーザー体験](/nfc-wallet-sdk-ios/ja/implement-nfc-wallet/tokenize-a-card.md#green-flow).

## シーケンス図

<figure><img src="/files/e4bebf1980fb4611716a8c9df698d8a66a5c0bae" alt=""><figcaption><p>Green flow のデジタル化シーケンス</p></figcaption></figure>

## SDK を統合する

その後 [カードの有効性を確認する](/nfc-wallet-sdk-ios/ja/implement-nfc-wallet/tokenize-a-card/check-card-eligibility.md):

1. 次を呼び出します `CardDigitizationService.digitizeCard()`.

   を含める `authenticationToken` デジタルウォレットのバックエンドによって生成された。
2. 条件なしでトークナイゼーションが承認された場合（green flow）:
   * NFC Wallet SDK は、デバイス上にデジタルカードと決済キーをプロビジョニングします。
   * プロビジョニングが成功すると、SDK は次の `digitizationApproved` イベント。

以下の例では、デジタル化の開始方法と green flow の結果の処理方法を示します。

```swift
func digitizeCard(
    _ termsAndConditions: CardDigitizationService.TermsAndConditions
) async throws {
    // ステップ 1: サービスを初期化します。
    let cardDigitizationService = CardDigitizationService()

    // ステップ 2: 入力を収集します。
    let authenticationToken = Data() // green flow 登録用のイシュアのバックエンドトークン。
    let fcmToken = "FACY6074293608087656831WRF1234" // 例のみ。

    // ステップ 3: デジタル化を開始します。
    try await cardDigitizationService.digitizeCard(
        withTNC: termsAndConditions.accept(),
        pushToken: fcmToken, // Firebase Cloud Messaging (FCM) トークン
        language: "en",
        authenticationToken: authenticationToken
    )

    // ステップ 4: 結果を監視します。
    for await state in await cardDigitizationService.eventStream {
        switch state {
        case let .digitizationApproved(digitalCardID):
            // Green flow: プロビジョニングに成功しました。
            _ = digitalCardID
            return
        default:
            break
        }
    }
}
```


---

# 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/green-flow-digitization.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.
