Skip to main content

Overview

The Yuno iOS SDK provides a pre-built payment UI that handles payment method rendering, card tokenization, and 3DS authentication. It supports UIKit and SwiftUI.
The iOS SDK maintains SAQ-A PCI compliance (the simplest compliance level. Card data never touches your servers).

Prerequisites

  • Xcode 15 or later
  • iOS 14.0+ deployment target
  • Swift 5.9+
  • Yuno API keys (Authentication)
  • At least one payment method enabled in your Dashboard

Installation

Add the Yuno SDK to your Podfile:
Then install:
Open the .xcworkspace file (not .xcodeproj) after installation.

SDK Initialization

Initialize the SDK early in your app lifecycle, typically in AppDelegate or @main App struct.

Configuration options

Full Checkout

Full Checkout renders all enabled payment methods with a single call. Yuno manages the entire UI.
1

Create a checkout session (server-side)

Create a session from your backend:
Pass the checkout_session token to your iOS app.
2

Present Full Checkout (UIKit)

3

Present Full Checkout (SwiftUI)

4

Verify payment (server-side)

Always confirm the payment status from your backend:

Seamless Checkout

Seamless Checkout gives you control over payment method selection while Yuno handles the payment form.
1

Retrieve available payment methods

Use the checkout session to fetch available methods:
2

Start Seamless Checkout for selected method

3

Handle the payment creation callback

3DS Handling

The SDK handles 3D Secure authentication automatically. When a payment requires 3DS, the SDK presents the authentication challenge within the checkout flow. No additional code is required. The yunoPaymentResult delegate method receives the final result after 3DS completes.
Test 3DS flows in sandbox using Yuno’s test card numbers. Check the Testing guide for available test credentials.

Apple Pay

To enable Apple Pay in the Yuno iOS SDK:
1

Configure Apple Pay in Xcode

Enable the Apple Pay capability in your target’s Signing & Capabilities tab. Add your merchant identifier.
2

Enable Apple Pay in Yuno Dashboard

Navigate to Dashboard > Settings > Payment Methods and enable Apple Pay for your account.
3

Pass Apple Pay configuration

Customization

Customize the checkout appearance to match your app’s design.

Localization

The SDK supports automatic localization based on the device locale. Override with:
Supported languages: English, Spanish, Portuguese, Indonesian, Malay, Thai.

Error Handling

Handle SDK errors through the delegate:

Common error codes

Testing in Sandbox

1

Use sandbox environment

Set environment: .sandbox during initialization.
2

Use test credentials

Use sandbox API keys from Dashboard > API Keys > Sandbox.
3

Test with Yuno test cards

Use Yuno-provided test card numbers to simulate different outcomes (approval, decline, 3DS). See Testing.
Sandbox transactions use simulated providers. Some payment methods may have limited availability in sandbox compared to production.

Troubleshooting

SDK not initializing

  • Verify you are calling Yuno.initialize() before any other SDK method
  • Confirm the public API key is correct and matches your environment
  • Check that the deployment target is iOS 14.0+

Checkout not appearing

  • Ensure the checkout session token is valid and not expired
  • Verify the presenting view controller is in the view hierarchy
  • Check that at least one payment method is enabled in Dashboard for the specified country

Payment failing silently

  • Implement the yunoPaymentResult delegate method to capture all outcomes
  • Enable verbose logging for debugging:
  • Check Xcode console for SDK log output

Build errors after installation

  • CocoaPods: Run pod deintegrate && pod install to clean and reinstall
  • SPM: Reset package caches via File > Packages > Reset Package Caches
  • Ensure use_frameworks! is present in your Podfile

API Reference

YunoConfig Parameters

Full Checkout Parameters

Seamless Checkout Parameters

Delegate Methods

YunoPaymentDelegate:YunoSeamlessDelegate:

Enrollment

Start card enrollment (vaulting) for returning customers:
YunoEnrollmentDelegate:Enrollment Statuses: CREATED, READY_TO_ENROLL, ENROLLED, ENROLL_FAILED, EXPIRED, REJECTED, DECLINED, UNENROLLED

Extended Customization

Additional appearance properties beyond the basics:Dark Mode: The SDK supports iOS dark mode automatically with dynamic colors. Use semantic colors (.systemBackground, .label) for automatic adaptation.

Info.plist Entries

Apple Pay:
Camera Access (for card scanning):

Next steps

Mobile SDK Overview

Compare all mobile SDK options.

Android SDK

Building for Android? Start here.

Customization

Theme and style your checkout.

Testing

Test card numbers and sandbox setup.