Skip to content

techquest/dfs-card-tokenization-sdk-android

Repository files navigation

Interswitch Card Tokenization SDK Sample – Android

The Interswitch Card Tokenization SDK allows you to securely collect and tokenize card details within your mobile application. The SDK handles the entire tokenization flow - card entry, encryption, OTP verification, and token delivery - through a built-in, pre-styled UI. You receive a single token reference on success, with no raw card data ever passing through the app using the SDK.


Requirements

  • minSdk 24+ (Android 5.0+)
  • Android Studio Flamingo+
  • Internet permission
  • Your issued Interswitch client id and client secret

1. Installation

Add repositories in your root settings.gradle or build.gradle (project level) :

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

Then add the SDK in your app module build.gradle:

dependencies {
    implementation "com.interswitchng:card-tokenization-sdk-android:1.0.0"
}

For Kotlin DSL

implementation("com.interswitchng:card-tokenization-sdk-android:1.0.0")

2. API Reference

Initialization

Initializes the secure tokenization session for a specific customer. Must be called before launch.

CardTokenizationSDK.initializeCardTokenizationSDK(
    "clientId", 
    "clientSecret", 
    "CustomerPhoneNumber", // e.g. "2348012345678"
    "customerEmail" // e.g. "user@email.com"
)

Launch Card Tokenization

import com.interswitchng.tokenization.CardTokenizationSDK
import com.interswitchng.tokenization.CardTokenizationResultCallback

CardTokenizationSDK.launchCardTokenization(
    context = this,
    resultCallback = object : CardTokenizationResultCallback {
        override fun onSuccess(token: String) {
            // token is your vault token – send to backend
        }

        override fun onError(error: String) {
            // Handle error – show user-friendly message
            Toast.makeText(this@MainActivity, error, Toast.LENGTH_LONG).show()
        }

        override fun onCancelled() {
            // User closed the sheet
        }
    }
)

Contributing

We welcome contributions! Please create an issue or submit a pull request for enhancements and bug fixes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages