# 3DS Native SDKs (Android)

The WHITELABEL Android SDK supports running 3D Secure (3DS) challenges natively inside your app using **Netcetera's 3DS SDK**. Native 3DS gives a smoother UX than the WebView-based fallback (no in-app browser jump) and may be required by some acquirers for frictionless authentication.

<Note>
  Native 3DS via Netcetera applies to both **payment** and **enrollment** flows (enrollment since WHITELABEL Android SDK 2.22.0).
</Note>

<Note>
  Native 3DS is **opt-in**: you only need to install the provider module if your integration runs 3DS challenges in-app. If you are not enabling 3DS, you can skip this guide.
</Note>

<Note>
  This is a separate module (roughly 3-4 MB) so you only add it if you need native 3DS. If your app already customizes the WHITELABEL SDK's styles, those styles propagate automatically to the challenge screen, no additional UI configuration is needed.
</Note>

This guide covers what is specific to Netcetera. Installation and activation follow the same rules as every other module, see [External Native Modules (Android)](/docs/sdks/external-native-modules/android-overview).

## Requirements

- Android **6.0 (API level 23)** or higher, the minimum of the WHITELABEL Android SDK since 2.24.0.
- **WHITELABEL Payments SDK 2.16.0 or higher** already installed in your app (`com.yuno.payments:android-sdk`).
- The Netcetera 3DS provider module (`com.yuno.payments:yuno-sdk-3ds-netcetera`), installed via Gradle (see below).

## Compatibility

Each release of this module is built and tested against a minimum version of the WHITELABEL Payments SDK. The module's POM does not pin a specific core version. Versions below the minimum may not expose the APIs this module relies on and can fail at runtime with `NoSuchMethodError` / `NoSuchFieldError`.

| WHITELABEL 3DS Netcetera | Requires WHITELABEL Payments SDK |
|---|---|
| `1.0.1` | `≥ 2.16.0` |

When upgrading either dependency, bump both sides together so the combination stays within a supported pair.

## Step 1: Declare the Netcetera Maven repository

The Netcetera 3DS SDK is hosted on Netcetera's public Maven server. Because Gradle does not propagate transitive repositories through POM metadata, your app must declare the repo explicitly so it can resolve the Netcetera SDK dependency.

Add the entry to your project's settings file inside `dependencyResolutionManagement.repositories`:

<Tabs>
  <Tab title="Groovy DSL">
    In `settings.gradle`:

    ```groovy
    dependencyResolutionManagement {
        repositories {
            google()
            mavenCentral()
            maven { url "https://yunopayments.jfrog.io/artifactory/snapshots-libs-release" }
            // Required by Whitelabel 3DS Netcetera module
            maven { url "https://nexus.extranet.netcetera.biz/nexus/repository/public-repository-maven/" }
        }
    }
    ```
  </Tab>

  <Tab title="Kotlin DSL">
    In `settings.gradle.kts`:

    ```kotlin
    dependencyResolutionManagement {
        repositories {
            google()
            mavenCentral()
            maven { url = uri("https://yunopayments.jfrog.io/artifactory/snapshots-libs-release") }
            // Required by Whitelabel 3DS Netcetera module
            maven { url = uri("https://nexus.extranet.netcetera.biz/nexus/repository/public-repository-maven/") }
        }
    }
    ```
  </Tab>
</Tabs>

<Info>
  You may still be using the legacy `allprojects { repositories { … } }` block in your root `build.gradle`. If so, add the same Netcetera `maven { url "…" }` line there instead.
</Info>

## Step 2: Add the dependency

Add the WHITELABEL 3DS Netcetera dependency to your app module's build file:

<Tabs>
  <Tab title="Groovy DSL">
    In `build.gradle`:

    ```groovy
    dependencies {
        implementation "com.yuno.payments:android-sdk:{last_version}"
        implementation "com.yuno.payments:yuno-sdk-3ds-netcetera:{last_version}"
    }
    ```
  </Tab>

  <Tab title="Kotlin DSL">
    In `build.gradle.kts`:

    ```kotlin
    dependencies {
        implementation("com.yuno.payments:android-sdk:{last_version}")
        implementation("com.yuno.payments:yuno-sdk-3ds-netcetera:{last_version}")
    }
    ```
  </Tab>
</Tabs>

The upstream Netcetera 3DS SDK wrapped by `yuno-sdk-3ds-netcetera` and its required `androidx.startup` dependency are pulled in transitively. You don't need to declare them yourself.

## Activating the 3DS provider

The module **auto-registers** with the WHITELABEL Payments SDK when your app process starts (via [Jetpack App Startup](https://developer.android.com/topic/libraries/app-startup)). **No extra code is required**: just initialize the WHITELABEL SDK as usual:

```kotlin
import com.yuno.payments.Yuno

Yuno.initialize(
    application = this,
    apiKey = "YOUR_API_KEY",
)
```

<Tip>
  Once registered, the WHITELABEL Payments SDK automatically routes any 3DS challenge during checkout or enrollment through the Netcetera provider.
</Tip>

### Permissions

`android.permission.INTERNET` is declared by the module's manifest and merged into your app automatically. No action required.

## Sandbox certificate

When testing against the WHITELABEL sandbox environment, the Netcetera SDK requires a card scheme certificate to be present in your app.

<Info>
  **Contact your WHITELABEL TAM (Technical Account Manager) to obtain the certificate.** It is not distributed publicly.
</Info>

This is only required for sandbox testing, not for production.