Skip to main content

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

1

Add the Yuno Maven repository

In your project-level settings.gradle.kts:
2

Add the SDK dependency

In your app-level build.gradle.kts:
3

Sync Gradle

Click Sync Now in Android Studio or run:

SDK Initialization

Initialize the SDK in your Application class:
Register the Application class in AndroidManifest.xml:

Configuration options

Full Checkout

Full Checkout renders all enabled payment methods with a single call.

Activity / Fragment

1

Create a checkout session (server-side)

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

Register the checkout launcher

3

Launch Full Checkout

4

Verify payment (server-side)

Always confirm the payment status from your backend:

Jetpack Compose

Seamless Checkout

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

Retrieve available payment methods

2

Register the seamless checkout launcher

3

Launch for selected method

4

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.
Test 3DS flows in sandbox using Yuno’s test card numbers. Check the Testing guide for available test credentials.

Google Pay

To enable Google Pay in the Yuno Android SDK:
1

Enable Google Pay in Yuno Dashboard

Navigate to Dashboard > Settings > Payment Methods and enable Google Pay.
2

Add Google Pay metadata to manifest

3

Pass Google Pay configuration

ProGuard Rules

If you use code shrinking (R8/ProGuard), add these rules to your proguard-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:

Localization

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

Dark mode

The SDK respects the system dark mode setting by default. Colors adapt automatically unless you provide explicit appearance overrides.

Error Handling

Handle SDK errors through the result callback:

Common error codes

Testing in Sandbox

1

Use sandbox environment

Set environment = YunoConfig.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. 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 in Application.onCreate() before any Activity launches
  • Confirm the public API key is correct and matches your environment
  • Check that minSdk is set to 21 or higher in build.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 FullCheckoutLauncher is registered before onCreate() completes

Build errors

  • Duplicate classes: Add exclude rules 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 YunoSDK for SDK output

Fragment lifecycle conflicts

If using Fragments, register the launcher in onCreate() (not onViewCreated()):

API Reference

YunoConfig Parameters

FullCheckoutParams

SeamlessCheckoutParams

Callback Interfaces

OnPaymentListener:YunoSeamlessListener:

Enrollment

Register the enrollment launcher and start enrollment for returning customers:
Enrollment Statuses: CREATED, READY_TO_ENROLL, ENROLLED, ENROLL_FAILED, EXPIRED, REJECTED, DECLINED, UNENROLLED

Activity Result Handling

Register launchers at class level or in onCreate(). Never in onViewCreated():

Extended Customization

Additional appearance properties beyond the basics:Dark Mode: The SDK respects the system dark mode setting by default. Use forceDarkMode = true in YunoAppearance to override.

Payment Method Types

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.