> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

# Lite mode

> Migrate iOS Lite integrations (Yuno.startPaymentLite) to the unified Transaction API.

Lite mode pre-selected the payment method on the merchant side, then handed off to the SDK to render the form, tokenize, create the payment, handle 3DS, and report back. In the unified API this is the **default behavior** of `Transaction.start(paymentSelected:)`. No controller overrides needed.

## Before you start

* Replace `import YunoSDK` with `import SdkPayments`. Your public API key and the checkout sessions your backend creates do not change ([Before you begin](/docs/yuno-sdk/get-started#before-you-begin)).
* Decide who creates the payment. The checkout session's `workflow` must match that decision:

| Who creates the payment | In Lite you had | In the unified API | Session `workflow` |
| - | - | - | - |
| Your backend | `yunoCreatePayment` implemented | Override `createPayment` | Default (`SDK_CHECKOUT`) |
| The SDK | No equivalent: only Seamless let the SDK create the payment | No override | `SDK_SEAMLESS` |

<Warning>
  A default-workflow session with no `createPayment` override ends in `INTERNAL_ERROR`: the backend rejects the SDK's payment creation. See [`createPayment`](/docs/yuno-sdk/controllers/create-payment).
</Warning>

## Side-by-side

<CodeGroup>
  ```swift Before. Lite mode theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
  import YunoSDK

  // 1. Initialize once at app startup
  Yuno.initialize(
      apiKey: "your-public-api-key",
      config: YunoConfig(
          appearance: customAppearance,
          saveCardEnabled: true,
          keepLoader: false
      )
  )

  // 2. Implement the delegate
  final class Checkout: YunoPaymentDelegate {
      var checkoutSession: String = "session-from-backend"
      var countryCode: String = "CO"
      var language: String? = "en"
      var viewController: UIViewController?

      func yunoPaymentResult(_ result: Yuno.Result) {
          switch result.status {
          case .succeeded:      print("Success")
          case .reject:         print("Rejected")
          case .fail:           print("Failed")
          case .processing:     print("Processing")
          case .internalError:  print("Internal error")
          case .userCancelled:  print("User cancelled")
          @unknown default:     break
          }
      }

      // 3. Start the payment
      func pay(paymentSelected: PaymentMethodSelected) {
          Yuno.startPaymentLite(
              with: self,
              paymentSelected: paymentSelected,
              showPaymentStatus: true
          )
      }
  }
  ```

  ```swift After. Unified Transaction theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
  import SdkPayments

  // 1. Initialize once at app startup
  SdkPayments.initialize(apiKey: "your-public-api-key")

  // 2. Implement the controller
  final class Checkout: SdkPayments.TransactionController {

      func onStatus(status: SdkPayments.TransactionStatus) {
          switch status.status {
          case "INTERNAL_ERROR":  print("Internal error")
          case "USER_CANCEL":     print("User cancelled")
          // Handle other backend statuses (e.g. SUCCEEDED, DECLINED, PENDING) as needed.
          default:                break
          }
      }

      // 3. Start the payment
      func pay(paymentSelected: SdkPayments.PaymentMethodSelected) {
          let config = SdkPayments.TransactionConfig(
              checkoutSession: "session-from-backend",
              countryCode: "CO",
              language: "en",
              appearance: customAppearance,    // optional
              controller: self,
              showStatusScreen: true,
              saveCardEnabled: true
          )

          SdkPayments.Transaction(config: config)
              .start(paymentSelected: paymentSelected)
      }
  }
  ```
</CodeGroup>

## What changes

Grouped in the order you edit the code. **Renamed**: same role, new name. **Moved**: same value, new owner. **Removed**: nothing to call. The last column is the only thing you have to do beyond the rename.

### Initialization and config

| Lite | Unified | Change | What to do |
| - | - | - | - |
| `import YunoSDK` | `import SdkPayments` | Renamed | |
| `Yuno.initialize(apiKey:config:)` | `SdkPayments.initialize(apiKey:)` | Renamed | `YunoConfig` is gone: its fields move to `SdkPayments.TransactionConfig` (next rows). The `callback:` parameter is gone too; use the `async` overload if you need to wait. |
| `YunoConfig.appearance` | `SdkPayments.TransactionConfig.appearance` | Moved | Pass it per transaction instead of once at startup. |
| `Yuno.Appearance` | `SdkPayments.Appearance` | Renamed | Same initializer; drop the `Yuno.` prefix. |
| `YunoConfig.saveCardEnabled` | `SdkPayments.TransactionConfig.saveCardEnabled` | Moved | Defaults to `false`. With `true`, the card form shows the save-card checkbox (payments only), unchecked. |
| `YunoConfig.keepLoader` | *(removed)* | Removed | The SDK keeps its loader. Override `showLoading` only if you want your own (see Controller). |
| `YunoPaymentDelegate.checkoutSession`, `.countryCode`, `.language`, `.viewController` | The same fields on `SdkPayments.TransactionConfig` | Moved | Delegate properties become config fields. `viewController` stays iOS-only and optional in SwiftUI. |
| `showPaymentStatus:` argument of `startPaymentLite` | `SdkPayments.TransactionConfig.showStatusScreen` | Moved | See the note below. |

<Note>
  **The SDK result screen is off by default now.** Set `showStatusScreen: true` to keep it.
</Note>

### Controller

| Lite | Unified | Change | What to do |
| - | - | - | - |
| `YunoPaymentDelegate` | `SdkPayments.TransactionController` | Renamed | Conform the same class and pass it as `TransactionConfig.controller`. As before, the SDK does not retain it: keep it alive for the whole transaction. |
| `yunoPaymentResult(_:)` | `onStatus(status:)` | Renamed | Still the single outcome callback, once per transaction, also when the SDK shows its result screen. `status` and `substatus` come from the backend; the SDK itself only emits `INTERNAL_ERROR` and `USER_CANCEL`. See [`Status`](/docs/yuno-sdk/reference/objects-you-receive#status). |
| `Yuno.Result.message` | `SdkPayments.TransactionStatus.message` | Renamed | Same role. `source` is now an enum (`.sdk` / `.backend`) and `code` is non-optional. |
| `yunoCreatePayment(with:)` / `(with:information:)` | `createPayment(token:)` | Renamed | Optional. One handler replaces both variants; `token` is the full One-Time Token as a dictionary. Create the payment and return: returning is what used to be `continuePayment()`. If the handler throws, the flow stops and `onStatus` is not called, so show the error yourself. See [`createPayment`](/docs/yuno-sdk/controllers/create-payment). |
| `YunoLoaderDelegate.onLoading(isLoading:)` | `showLoading(isLoading:)` | Renamed | Optional. Lite never invoked it. If you override it now, the SDK hides its own loader and reports the state to you. See [`showLoading`](/docs/yuno-sdk/controllers/show-loading). |
| `onInstallmentSelected(_:)` with `YunoInstallmentSelected` | `onInstallmentSelected(_:)` with `SdkPayments.InstallmentSelected` | Renamed | Optional. Same trigger and fields; only the payload type changes. See [`onInstallmentSelected`](/docs/yuno-sdk/controllers/on-installment-selected). |
| `YunoShippingDelegate.onShippingAddressChanged(_:shippingInfo:)` | `onShippingAddressChanged(_:shippingInfo:)` via `SdkPayments.ShippingAddressHandling` | Moved | Optional. Conform the controller to the protocol; the types drop the `Yuno` prefix and the completion-based variant is gone. See [`onShippingAddressChanged`](/docs/yuno-sdk/controllers/on-shipping-address-changed). |

### Entry points

| Lite | Unified | Change | What to do |
| - | - | - | - |
| `Yuno.startPaymentLite(with:paymentSelected:showPaymentStatus:)` | `SdkPayments.Transaction(config:).start(paymentSelected:)` | Renamed | Build the config, then `start`. You still pick the method and pass it. |
| `Yuno.continuePayment()` | *(removed)* | Removed | Delete the call: returning from `createPayment` resumes the flow. Set [`autoContinuePayment`](/docs/yuno-sdk/reference/objects-you-pass#autocontinuepayment) to `false` only if you need the SDK to stop right after the payment is created. |
| `Yuno.receiveDeeplink(_:)` | `SdkPayments.handleDeeplink(_:)` | Renamed | Same role: forward the URL your app receives after an external redirect. See [Handle deeplinks](/docs/yuno-sdk/features/handle-deeplinks). |
| `Yuno.hideLoader()` | *(removed)* | Removed | Delete the call: the SDK dismisses its own loader. With a `showLoading` override you receive `isLoading: false` instead. |

## Related

* [Get Started](/docs/yuno-sdk/get-started). Full unified-API walkthrough.
* [`TransactionConfig`](/docs/yuno-sdk/reference/objects-you-pass#transaction-config). Complete field reference.
* [`Status`](/docs/yuno-sdk/reference/objects-you-receive#status). Values and substatus.
* [Migration / Seamless](/docs/yuno-sdk/migration/ios/payment/seamless). Almost the same migration; Seamless and Lite collapse into the same default path.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.