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

# Green flow digitization

## Overview

Green flow is a Tokenization flow where the issuer backend approves Tokenization without step-up authentication.

This flow is common when the NFC Wallet SDK is integrated in the issuer application and the end user is already authenticated in-app.

## User experience

See [Green flow user experience](/nfc-wallet-sdk-ios/implement-nfc-wallet/tokenize-a-card.md#green-flow).

## Sequence diagram

<figure><img src="/files/rPardsCUXRy2vR6JnIho" alt=""><figcaption><p>Green flow digitization sequence</p></figcaption></figure>

## Integrate SDK

After you [Check card eligibility](/nfc-wallet-sdk-ios/implement-nfc-wallet/tokenize-a-card/check-card-eligibility.md):

1. Call `CardDigitizationService.digitizeCard()`.

   Include an `authenticationToken` generated by your digital wallet backend.
2. If Tokenization is approved with no conditions (green flow):
   * The NFC Wallet SDK provisions the digital card and payment keys on the device.
   * When provisioning succeeds, the SDK emits the `digitizationApproved` event.

The example below shows how to start digitization and handle the green flow outcome.

```swift
func digitizeCard(
    _ termsAndConditions: CardDigitizationService.TermsAndConditions
) async throws {
    // Step 1: Initialize the service.
    let cardDigitizationService = CardDigitizationService()

    // Step 2: Collect inputs.
    let authenticationToken = Data() // Issuer backend token for green flow enrollment.
    let fcmToken = "FACY6074293608087656831WRF1234" // Example only.

    // Step 3: Start digitization.
    try await cardDigitizationService.digitizeCard(
        withTNC: termsAndConditions.accept(),
        pushToken: fcmToken, // Firebase Cloud Messaging (FCM) token
        language: "en",
        authenticationToken: authenticationToken
    )

    // Step 4: Listen for outcomes.
    for await state in await cardDigitizationService.eventStream {
        switch state {
        case let .digitizationApproved(digitalCardID):
            // Green flow: provisioning succeeded.
            _ = 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/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.
