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.The Android SDK maintains SAQ-A PCI compliance (the simplest compliance level. Card data never touches your servers).
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
SDK Initialization
Initialize the SDK in yourApplication class:
AndroidManifest.xml:
Configuration options
| Parameter | Type | Required | Description |
|---|---|---|---|
publicApiKey | String | Yes | Your Yuno public API key |
environment | Environment | Yes | SANDBOX or PRODUCTION |
language | YunoLanguage | No | UI language. Defaults to device locale |
cardFlow | CardFlow | No | ONE_STEP (default) or MULTI_STEP |
Full Checkout
Full Checkout renders all enabled payment methods with a single call.Activity / Fragment
Create a checkout session (server-side)
Create a session from your backend:Pass the
checkout_session token to your Android app.Jetpack Compose
Seamless Checkout
Seamless Checkout gives you control over payment method selection while Yuno handles the payment form.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
Navigate to Dashboard > Settings > Payment Methods and enable Google Pay.
ProGuard Rules
If you use code shrinking (R8/ProGuard), add these rules to yourproguard-rules.pro:
The SDK ships with consumer ProGuard rules. These additional rules are only needed if you encounter obfuscation issues.
Customization
Customize the checkout appearance to match your app’s design:| Property | Type | Description |
|---|---|---|
primaryColor | Int (Color) | Primary accent color for buttons and highlights |
backgroundColor | Int (Color) | Background color of the checkout sheet |
textColor | Int (Color) | Primary text color |
cornerRadiusDp | Int | Corner radius in dp for cards and buttons |
fontFamily | String | Font family name |
buttonStyle | ButtonStyle | ROUNDED or RECTANGULAR |
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
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
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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
publicApiKey | String | Yes | . | Your Yuno public API key |
environment | YunoConfig.Environment | Yes | . | SANDBOX or PRODUCTION |
language | YunoLanguage | No | Device locale | UI language (ENGLISH, SPANISH, PORTUGUESE, INDONESIAN, MALAY, THAI) |
cardFlow | CardFlow | No | ONE_STEP | ONE_STEP (single form) or MULTI_STEP (step-by-step card entry) |
enableLogging | Boolean | No | false | Enable verbose SDK logging to Logcat (tag: YunoSDK) |
appearance | YunoAppearance | No | Default theme | Visual customization |
FullCheckoutParams
| Parameter | Type | Required | Description |
|---|---|---|---|
checkoutSession | String | Yes | Checkout session ID from your server |
countryCode | String | Yes | ISO 3166-1 alpha-2 country code |
googlePay | YunoGooglePayConfig | No | Google Pay configuration |
SeamlessCheckoutParams
| Parameter | Type | Required | Description |
|---|---|---|---|
checkoutSession | String | Yes | Checkout session ID |
paymentMethodType | String | Yes | Payment method type (e.g., "CARD", "PIX", "PSE") |
countryCode | String | Yes | ISO 3166-1 alpha-2 country code |
vaultedToken | String | No | Vaulted token for saved payment methods |
Callback Interfaces
OnPaymentListener:| Method | Parameters | Description |
|---|---|---|
onPaymentStateChange(state) | PaymentState | Called when the payment lifecycle state changes |
onTokenGenerated(token) | String | Called when a one-time token is generated for payment creation |
| Method | Parameters | Description |
|---|---|---|
yunoCreatePayment(oneTimeToken, tokenWithInformation) | String, YunoTokenData | Called when a token is generated. Create payment server-side, then call Yuno.continuePayment() |
yunoPaymentResult(result) | PaymentResult | Called with the final payment outcome |
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:| Property | Type | Description |
|---|---|---|
errorColor | Int (Color) | Color for error messages and invalid field states |
borderColor | Int (Color) | Border color for input fields |
elevation | Float | Elevation in dp for the checkout sheet |
fontSizeSp | Int | Base font size in sp |
forceDarkMode = true in YunoAppearance to override.Payment Method Types
| Constant | Description |
|---|---|
"CARD" | Credit and debit cards |
"PIX" | PIX instant payments (Brazil) |
"PSE" | PSE bank transfers (Colombia) |
"OXXO" | OXXO cash vouchers (Mexico) |
"NEQUI" | Nequi mobile wallet (Colombia) |
"APPLE_PAY" | Apple Pay |
"GOOGLE_PAY" | Google Pay |
Next steps
Mobile SDK Overview
Compare all mobile SDK options.
iOS SDK
Building for iOS? Start here.
Customization
Theme and style your checkout.
Testing
Test card numbers and sandbox setup.