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.
- minSdk 24+ (Android 5.0+)
- Android Studio Flamingo+
- Internet permission
- Your issued Interswitch client id and client secret
compileSdkVersion36 and above- Android Gradle Plugin 8.14.3
- Kotlin 2.1.0
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")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"
)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
}
}
)We welcome contributions! Please create an issue or submit a pull request for enhancements and bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.