Initialize the DEUNA Android SDK in your application.
Stable version: 2.9.5
Requirements
To use the DEUNA Android SDK, you must meet the following requirements:
- Your project must use a minimum Android API version 24 or higher
- Knowledge of Android development with Kotlin or Java.
- An active account at DEUNA.
- Valid DEUNA credentials.
- Minimum configurations in your Android project:
minSdkVersion
24 or higher.
If you experience any delays in obtaining your credentials, please contact [email protected].
The DEUNA SDK also supports Huawei devices running HarmonyOS 2.0 or higher.
Install the SDK Android
Web SDK initialization begins.
Follow security and privacy practices when handling user financial information.
1. Add the JitPack repository
Add the jitpack repository in the block dependencyResolutionManagement
in your root file settings.gradle
..
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' } // <-- Add this line
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { setUrl("https://jitpack.io") } // <-- AGREGAR ESTA LINEA
}
}
If you don't have the block in your project, then add the repository in the block repositories which is located in:
build.gradle
root fileapp/build.gradle
file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' } // <-- Add this line
}
}
2. Configure the build.gradle file
Open app/build.gradle
in your Android project.
Your project must use a minimum version of Android API 22 or higher.
android {
...
defaultConfig {
...
minSdk 24 // Or superior
...
}
}
3. Add dependencies
Add the following dependencies in your project's app/build.gradle
file.
dependencies {
.
.
.
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.github.deuna-developers:deuna-sdk-android:2.9.5' // DEUNA SDK
}
dependencies {
.
.
.
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.github.deuna-developers:deuna-sdk-android:2.9.5") // DEUNA SDK
}
Test SDK features in a development environment to validate proper functionality before releasing your app.
Clear the Android Studio cache if you are updating the SDK from a version prior to 2.5.1.

4. Initialize the SDK
Initialize the SDK or create an instance of the class DeunaSDK
.
Through Initialization
// Initialize the SDK by the creation of a singleton
DeunaSDK.initialize(
environment = Environment.SANDBOX, // Test or production environments (Environment.SANDBOX or Environment.PRODUCTION)
publicApiKey = "YOUR_PUBLIC_API_KEY" // DEUNA Public key
)
// Now you can use the SDK through a shared instance of DeunaSDK
DeunaSDK.shared
// Example
DeunaSDK.shared.initCheckout(...)
Instance creation
val deunaSDK = DeunaSDK(
environment = Environment.SANDBOX, // Test or production environments (Environment.SANDBOX or Environment.PRODUCTION)
publicApiKey = "YOUR_PUBLIC_API_KEY" // DEUNA Public key
)
// SDK usage
deunaSDK.initCheckout(...)
5. Choose the widget component
Continue the integration process following the specific instructions for each component.
Choose the component: