> 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).

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

## 概要

グリーンフローは、イシュアのバックエンドがステップアップ認証なしでトークン化を承認するトークン化フローです。

このフローは、NFCウォレットSDKがイシュアのアプリ内で統合され、エンドユーザーが既にアプリ内で認証済みの場合に一般的です。

## ユーザーエクスペリエンス

参照 [グリーンフローのユーザーエクスペリエンス](/nfc-wallet-sdk-ios/ja/implement-nfc-wallet/tokenize-a-card.md#green-flow).

## シーケンス図

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

## SDKを統合する

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

1. 呼び出す `CardDigitizationService.digitizeCard()`.

   を含める `authenticationToken` あなたのデジタルウォレットのバックエンドによって生成されたもの。
2. 条件なしでトークン化が承認された場合（グリーンフロー）：
   * NFCウォレットSDKはデバイス上にデジタルカードと支払いキーをプロビジョニングします。
   * プロビジョニングに成功すると、SDKは `digitizationApproved` イベントを発行します。

以下の例は、デジタル化を開始し、グリーンフローの結果を処理する方法を示します。

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

    // ステップ2: 入力を収集します。
    let authenticationToken = Data() // グリーンフロー登録のためのイシュアのバックエンドトークン。
    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):
            // グリーンフロー: プロビジョニングが成功しました。
            _ = 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.
