How it works
- You add the module to your app as a Gradle dependency, next to the Yuno SDK.
- When the app starts, the module registers itself with the Yuno SDK. There is no code to write.
- During checkout, the Yuno SDK asks the backend which providers apply to the transaction and uses the matching module: for example, it collects a device fingerprint and attaches it to the payment, or runs the 3D Secure challenge natively instead of in a WebView.
Available modules
https://yunopayments.jfrog.io/artifactory/snapshots-libs-release). A module does not pin a specific Yuno SDK version: you stay in control of the android-sdk version, as long as it is at or above the minimum in the table. Netcetera has extra setup (a second Maven repository and a sandbox certificate), covered in Netcetera 3DS (Android).
Installation
Add the modules you need to your app module’s build file, next to the Yuno SDK dependency. Each module already brings its vendor SDK and its own dependencies, so nothing else is required.- Groovy DSL
- Kotlin DSL
build.gradle:Activating a module
Every module registers itself with the Yuno SDK when your app process starts, through Jetpack App Startup. No code is required: keep initializing the Yuno SDK exactly as you do today.If your app disables App Startup
If your app disables App Startup
androidx.startup.InitializationProvider with tools:node="remove") to control startup work themselves. In that case the modules cannot register on their own. Run their initializers yourself, once, before Yuno.initialize(...), using App Startup’s manual API:What each module needs from your app
ClearSale antifraud
- Sends ClearSale’s own session id to Yuno as the payment’s
customer.device_fingerprint. Nothing changes in the data you send. - Collection runs when the shopper confirms the payment. It is bounded by the
timeoutconfigured for the ClearSale provider in your Yuno account (5 seconds by default). Keep that timeout above 1 second, otherwise collection times out and the payment continues without a fingerprint. - Declares
INTERNET,ACCESS_NETWORK_STATEandACCESS_WIFI_STATE; they are merged into your manifest automatically. - Never requests or uses location. Do not add
play-services-locationversion 21 or higher next to this module: those versions are incompatible with the bundled ClearSale SDK.
NoClassDefFoundError: com.google.android.gms.location.LocationServices stack trace on every collection. It is caught inside the ClearSale SDK, which then skips its location collector. The trace is expected and harmless.Migrating from the legacy com.yuno.fraud-prevention:clearsale dependency
Migrating from the legacy com.yuno.fraud-prevention:clearsale dependency
com.yuno.fraud-prevention:clearsale dependency:- Remove that dependency from your app’s build file and add
yuno-sdk-antifraud-clearsaleinstead. - Remove the
onCreateYunoClearSale,onResumeYunoClearSaleandonStopYunoClearSalecalls from your Activity lifecycle methods. - Stop passing the ClearSale session id as
merchantSessionId. The Yuno SDK now collects and sends it for you.
Koin antifraud
- Sends the Koin device fingerprint to Yuno as the payment’s
customer.device_fingerprint. Nothing changes in the data you send. - Declares
INTERNET; it is merged into your manifest automatically. - Never requests or uses location. The Koin SDK is initialized with its geolocation feature disabled, so the module does not read
ACCESS_FINE_LOCATIONorACCESS_COARSE_LOCATIONeven when your app holds them.
Netcetera 3DS
- Runs the 3D Secure challenge inside your app, for payments and card enrollment, instead of the WebView-based challenge. If your app customizes the Yuno SDK styles, they propagate to the challenge screen.
- Needs Netcetera’s Maven repository in your project and, for sandbox testing only, a certificate provided by your Yuno TAM. Both steps are in Netcetera 3DS (Android).
Troubleshooting
The module is installed but the fingerprint or native challenge never shows up
The module is installed but the fingerprint or native challenge never shows up
- The provider is enabled for your Yuno account. Modules only run when the backend asks for that provider on the transaction; ask your Yuno TAM if you are not sure.
- The module registered at startup: filter Logcat by
KoinAntifraudorClearSaleAntifraudand look for theregisteredline. - Your app is not removing the App Startup provider from the manifest. If it is, run the module initializers manually as described in Activating a module.
Crash at runtime with NoSuchMethodError or NoSuchFieldError mentioning com.yuno
Crash at runtime with NoSuchMethodError or NoSuchFieldError mentioning com.yuno
android-sdk is older than the version the module requires. Bump it to the minimum listed in Available modules, or higher.Gradle: could not find com.netcetera.threeds…
Gradle: could not find com.netcetera.threeds…
Logcat: NoClassDefFoundError com.google.android.gms.location.LocationServices (ClearSale)
Logcat: NoClassDefFoundError com.google.android.gms.location.LocationServices (ClearSale)
play-services-location 21 or higher to work around it: it breaks the bundled ClearSale SDK.Payments go through but without a ClearSale fingerprint
Payments go through but without a ClearSale fingerprint
timeout configured in your Yuno account is too low for ClearSale’s capture (which waits 500 ms before generating the session id). Keep it at 1 second or more; the default is 5 seconds.Manifest merger conflict on androidx.startup.InitializationProvider
Manifest merger conflict on androidx.startup.InitializationProvider
tools:node="merge" on the provider, or run the module initializers manually as described in Activating a module.