Skip to main content

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.

Orientation: Choosing Your Integration Flow, before you begin, please review the Official Integration Flow.
  • Standard Flow (Full Checkout): 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.

Step 1: Include the library in your project

CocoaPods

Add the following line to your Podfile:
pod 'YunoSDK', '~> 1.1.22'

Swift Package Manager

Add YunoSDK as a dependency:
.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:
import YunoSDK

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

Step 3: Adopt YunoPaymentDelegate

Adopt the YunoPaymentDelegate protocol:
Swift 6 Concurrency RequirementsIf you’re using Swift 6, you’ll need to implement the YunoPaymentDelegate protocol with specific concurrency considerations. See the Swift 6 Concurrency guide for detailed implementation options and best practices.
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

startPaymentLite(
    with: self,
    paymentSelected: paymentSelected,
    showPaymentStatus: true
)

Step 5: Continue payment (Required)

If sdk_action_required: true is returned by the API, call:
Yuno.continuePayment()
Demo AppSee the Yuno iOS SDK repository for full implementation examples.