Set up Tap to Pay on Android
Configure the Full SDK, app attestation, signing fingerprints and runtime permissions for Android contactless acceptance.
Choose the package and toolchain
Tap to Pay requires libs/full and Cloud Commerce. Lite cannot perform Tap to Pay. The preparation guide specifies Android 12 for all required card schemes and notes an enforced floor of Android 11; use Android 12 as the supported integration baseline. The documented toolchain minimums are Java 17 and Gradle 8.6.
Onboard each signing identity
Provide the application package, signing-certificate SHA-256 digest, Play Integrity encryption keys and intended test/production countries through the agreed onboarding channel. Link the Cloud project and Play Integrity in Play Console, and publish at least an internal-testing release. Different debug and release signing keys require separate onboarding configurations. The onboarding submission describes a Base64 SHA-256 digest. The SDK CertificateFingerprint property expects a hexadecimal SHA-256 string. They must represent the same signing certificate. The onboarding page leaves its contact blank, while the Android overview and FAQ name taptopay-app-onboarding@nmi.com; confirm your program’s channel before sharing onboarding material.
Install the correct dependencies
Use the test Cloud Commerce AAR during development and the production AAR for release. Full builds also need the release-matched Logback and SLF4J dependencies; omitting them can cause FailedToInitializeTapToMobile. Exclude the duplicate META-INF/INDEX.LIST resource and do not reference org.apache.http.legacy. Follow the SDK bundle for the complete dependency versions. // Full-flavour resource merge setting inside android { ... } packaging { resources { excludes += 'META-INF/INDEX.LIST' } }
Configure the phone
Supply ApiKey, ApplicationIdentifier, Environment and CertificateFingerprint through setProperties. Register listeners before connectAndConfigure. These are SDK parameters, not browser API credentials. // After initialize and listener registration; use your configured test values. Parameters config = new Parameters(); config.add(ParameterKeys.ApiKey, apiKey); config.add(ParameterKeys.ApplicationIdentifier, applicationIdentifier); config.add(ParameterKeys.Environment, environment); config.add(ParameterKeys.CertificateFingerprint, signingCertificateSha256Hex); ChipDnaMobile.getInstance().setProperties(config); Parameters poi = new Parameters(); poi.add(ParameterKeys.TapToMobilePOI, ParameterValues.TRUE); poi.add(ParameterKeys.PaymentDevicePOI, ParameterValues.FALSE); ChipDnaMobile.getInstance().connectAndConfigure(poi);
Handle permissions and production attestation
Implement the documented NFC, location, phone-state and security permissions, plus Bluetooth permissions if supporting a reader. Tap to Pay needs connectivity. In production, developer options must be disabled and a USB device must not be connected. Signing-key, location or security-state mismatch can prevent attestation; preserve the SDK error rather than retrying a payment blindly.
Initialize through the application class
The Android overview requires a ChipDnaApplication subclass and registration in AndroidManifest.xml. Handle onSDKInitializationSuccess and onSDKInitializationFailed before exposing payment UI. Archive filenames vary between overview and preparation pages (mtf/production versus debug/release); use the supplied release’s matching Full binaries rather than renaming one variant. // Members of your ChipDnaApplication subclass. override fun onSDKInitializationSuccess() { super.onSDKInitializationSuccess() // Application may now continue its SDK setup. } override fun onSDKInitializationFailed(errorMessage: String?) { super.onSDKInitializationFailed(errorMessage) // Keep checkout disabled and show a recoverable setup error. }