Overview
The Yuno Android SDK provides a pre-built payment UI that handles payment method rendering, card tokenization, and 3DS authentication. It supports both View-based (Activity/Fragment) and Jetpack Compose integrations.Prerequisites
- Android Studio Hedgehog (2023.1) or later
- Minimum SDK: API 21 (Android 5.0)
- Target SDK: API 34+
- Kotlin 1.9+
- Gradle 8.0+
- Yuno API keys (Authentication)
- At least one payment method enabled in your Dashboard
Installation
Add the Yuno Maven repository
settings.gradle.kts:Add the SDK dependency
build.gradle.kts:Sync Gradle
SDK Initialization
Initialize the SDK in yourApplication class:
AndroidManifest.xml:
Configuration options
Full Checkout
Full Checkout renders all enabled payment methods with a single call.Activity / Fragment
Create a checkout session (server-side)
checkout_session token to your Android app.Register the checkout launcher
Launch Full Checkout
Verify payment (server-side)
Jetpack Compose
Seamless Checkout
Seamless Checkout gives you control over payment method selection while Yuno handles the payment form.Retrieve available payment methods
Register the seamless checkout launcher
Launch for selected method
Handle 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 payment result callback receives the final outcome after 3DS completes.Google Pay
To enable Google Pay in the Yuno Android SDK:Enable Google Pay in Yuno Dashboard
Add Google Pay metadata to manifest
Pass Google Pay configuration
ProGuard Rules
If you use code shrinking (R8/ProGuard), add these rules to yourproguard-rules.pro:
Customization
Customize the checkout appearance to match your app’s design:Localization
The SDK supports automatic localization based on the device locale. Override with:Dark mode
The SDK respects the system dark mode setting by default. Colors adapt automatically unless you provide explicitappearance overrides.
Error Handling
Handle SDK errors through the result callback:Common error codes
Testing in Sandbox
Use sandbox environment
environment = YunoConfig.Environment.SANDBOX during initialization.Use test credentials
Test with Yuno test cards
Troubleshooting
SDK not initializing
- Verify
Yuno.initialize()is called inApplication.onCreate()before any Activity launches - Confirm the public API key is correct and matches your environment
- Check that
minSdkis set to 21 or higher inbuild.gradle.kts
Checkout not appearing
- Ensure the checkout session token is valid and not expired
- Verify the Activity is not finishing when launching checkout
- Check that at least one payment method is enabled in Dashboard for the specified country
- Confirm the
FullCheckoutLauncheris registered beforeonCreate()completes
Build errors
- Duplicate classes: Add
excluderules for conflicting dependencies - Desugaring issues: Enable core library desugaring in
build.gradle.kts:
Payment failing silently
- Implement the result callback to capture all outcomes
- Enable verbose logging for debugging:
- Check Logcat with tag filter
YunoSDKfor SDK output
Fragment lifecycle conflicts
If using Fragments, register the launcher inonCreate() (not onViewCreated()):
API Reference
Full parameter reference, callback interfaces, enrollment, and ProGuard rules
Full parameter reference, callback interfaces, enrollment, and ProGuard rules
YunoConfig Parameters
FullCheckoutParams
SeamlessCheckoutParams
Callback Interfaces
OnPaymentListener:Enrollment
Register the enrollment launcher and start enrollment for returning customers:CREATED, READY_TO_ENROLL, ENROLLED, ENROLL_FAILED, EXPIRED, REJECTED, DECLINED, UNENROLLEDActivity Result Handling
Register launchers at class level or inonCreate(). Never in onViewCreated():Extended Customization
Additional appearance properties beyond the basics:forceDarkMode = true in YunoAppearance to override.