> ## 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 SDK (Payment iOS)

<Warning>
  **Orientation: Choosing Your Integration Flow**, before you begin, please review the [Official Integration Flow](/docs/sdks/overview/understanding-flows).

  * **Standard Flow ([Full Checkout](/docs/sdks/full-checkout/web-payments))**: Recommended for most merchants. Yuno handles the UI, security, and automatic updates for payment methods.
  * **Custom Flow (This SDK)**: Use this only if you require full control over the UX. **Note**: You will be responsible for manually handling payment statuses, 3DS transitions, and fraud routing data collection.
</Warning>

## Step 1: Include the library in your project

### CocoaPods

Add the following line to your Podfile:

```ruby theme={"theme":{"light":"github-dark","dark":"github-dark"}}
pod 'YunoSDK', '~> 1.1.22'
```

### Swift Package Manager

Add `YunoSDK` as a dependency:

```swift theme={"theme":{"light":"github-dark","dark":"github-dark"}}
.package(url: "https://github.com/yuno-payments/yuno-sdk-ios.git", .upToNextMajor(from: "1.1.17"))
```

## Step 2: Initialize SDK

Initialize the SDK with your Public API Key:

```swift theme={"theme":{"light":"github-dark","dark":"github-dark"}}
import YunoSDK

Yuno.initialize(
    apiKey: "PUBLIC_API_KEY",
    config: YunoConfig(),
    callback: { (value: Bool) in }
)
```

## Step 3: Adopt YunoPaymentDelegate

Adopt the `YunoPaymentDelegate` protocol:

<Info>
  **Swift 6 Concurrency Requirements**

  If you're using Swift 6, you'll need to implement the `YunoPaymentDelegate` protocol with specific concurrency considerations. See the [Swift 6 Concurrency](/docs/sdks/resources/swift-6-concurrency) guide for detailed implementation options and best practices.
</Info>

```swift theme={"theme":{"light":"github-dark","dark":"github-dark"}}
class ViewController: UIViewController, YunoPaymentDelegate {
    var checkoutSession: String { "checkout_session" }
    var countryCode: String { "US" }
    var viewController: UIViewController? { self }

    func yunoCreatePayment(with token: String) {
        // Call your backend to create a payment
    }

    func yunoPaymentResult(_ result: Yuno.Result) {
        // Handle final payment state
    }
}
```

## Step 4: Initiate the payment process

```swift theme={"theme":{"light":"github-dark","dark":"github-dark"}}
startPaymentLite(
    with: self,
    paymentSelected: paymentSelected,
    showPaymentStatus: true
)
```

## Step 5: Continue payment (Required)

If `sdk_action_required: true` is returned by the API, call:

```swift theme={"theme":{"light":"github-dark","dark":"github-dark"}}
Yuno.continuePayment()
```

<Note>
  **Demo App**

  See the [Yuno iOS SDK repository](https://github.com/yuno-payments/yuno-sdk-ios) for full implementation examples.
</Note>
