Overview
The Yuno Flutter SDK provides a cross-platform payment integration that works on both iOS and Android from a single Dart codebase. It wraps the native iOS and Android SDKs, providing a Flutter-idiomatic API with widgets and streams.The Flutter SDK maintains SAQ-A PCI compliance on both platforms. Card data never touches your servers.
Prerequisites
- Flutter 3.16+
- Dart 3.2+
- iOS 14.0+ deployment target
- Android minimum SDK: API 21 (Android 5.0)
- Xcode 15+ (for iOS builds)
- Android Studio (for Android builds)
- Yuno API keys (Authentication)
- At least one payment method enabled in your Dashboard
Installation
1
Add the dependency
Add Then run:
yuno_sdk_flutter to your pubspec.yaml:2
iOS platform setup
Set the minimum iOS deployment target in Install iOS dependencies:If using Apple Pay, add the following to
ios/Podfile:ios/Runner/Info.plist:3
Android platform setup
Set the minimum SDK version in Add the Yuno Maven repository in If using Google Pay, add to
android/app/build.gradle.kts:android/build.gradle.kts:android/app/src/main/AndroidManifest.xml:SDK Initialization
Initialize the SDK early in your app, typically inmain.dart:
Configuration options
Full Checkout
Full Checkout renders all enabled payment methods with a single widget.1
Create a checkout session (server-side)
Create a session from your backend:Pass the
checkout_session token to your Flutter app.2
Launch Full Checkout
3
Verify payment (server-side)
Always confirm the payment status from your backend:
Using the YunoCheckout widget
For declarative integration, use theYunoCheckout widget:
Seamless Checkout
Seamless Checkout gives you control over payment method selection while Yuno handles the payment form.1
Retrieve available payment methods
2
Launch Seamless Checkout for selected method
Payment callbacks via streams
For reactive architectures, listen to the payment event stream:3DS Handling
The SDK handles 3D Secure authentication automatically on both platforms. When a payment requires 3DS, the SDK presents the authentication challenge within the checkout flow. No additional code is required. The payment result includes the final outcome after 3DS completes.Platform Channels for Native Features
Apple Pay (iOS only)
Google Pay (Android only)
Customization
Customize the checkout appearance to match your app’s design:Localization
The SDK supports automatic localization based on the device locale. Override with:Error Handling
Common error codes
Testing in Sandbox
1
Use sandbox environment
Set
environment: YunoEnvironment.sandbox during initialization.2
Use test credentials
Use sandbox API keys from Dashboard > API Keys > Sandbox.
3
Test on both platforms
Run tests on both iOS simulator and Android emulator to verify platform-specific behavior:
4
Test with Yuno test cards
Use Yuno-provided test card numbers to simulate different outcomes. See Testing.
Sandbox transactions use simulated providers. Some payment methods may have limited availability in sandbox compared to production.
Troubleshooting
SDK not initializing
- Verify
YunoSDK.initialize()is called beforerunApp()inmain.dart - Ensure
WidgetsFlutterBinding.ensureInitialized()is called first - Confirm the public API key is correct and matches your environment
iOS build fails
- Verify
platform :ios, '14.0'is set inios/Podfile - Run
cd ios && pod install --repo-update && cd .. - Clean the build:
flutter clean && flutter pub get
Android build fails
- Verify
minSdk = 21is set inandroid/app/build.gradle.kts - Ensure the Yuno Maven repository is added to project-level
build.gradle.kts - Sync Gradle:
cd android && ./gradlew clean && cd ..
Checkout not appearing
- Ensure the checkout session token is valid and not expired
- Verify
contextis from a mounted widget when callingstartFullCheckout - Check that at least one payment method is enabled in Dashboard for the specified country
Platform-specific issues
- Use
flutter doctorto verify your development environment - Test on physical devices in addition to simulators/emulators
- Check platform-specific logs:
- iOS: Xcode console
- Android: Logcat with tag filter
YunoSDK
Hot reload limitations
SDK initialization state is preserved during hot reload but not hot restart. If checkout behavior is unexpected during development, perform a full restart:Next steps
Mobile SDK Overview
Compare all mobile SDK options.
iOS SDK
Need native iOS integration instead?
Android SDK
Need native Android integration instead?
Testing
Test card numbers and sandbox setup.