Tap to Pay on Android
Bring Tap to Pay to your app—no extra hardware required
NMI is among the first to bring Tap to Pay technology to market—enabling merchants to accept contactless payments directly on a smartphone or tablet. With Tap to Pay on Android and a supported payments app, merchants can accept all types of contactless payments—EMV cards, Apple Pay, Google Pay, and other digital wallets—directly on their Android device. No extra readers, payment terminals, or hardware required. The result is an easy, secure, and private in-person payment experience.
NMI’s Tap to Pay on Android SDK lets you embed this functionality directly into your application, eliminating the need to build and certify a custom payment product. Delivered as a fully certified solution, it simplifies development and enables you to offer merchants an embedded, innovative, and hardware-free payment experience with minimal overhead.
🔑 1. Enable Tap to Pay in NMI Marketplace
- Partner Portal & Merchant Portal: Log in and enable Tap to Pay.
- Watch the Cloud Commerce Tap to Pay application video for a quick setup overview.
🧪 2. Configure Test Mode
- Purpose: Submit test transactions without processing real payments.
- How to enable:
- Log into Merchant Portal →
Settings > Test Mode > Enable Test Mode
- Disable before going live.
- Log into Merchant Portal →
- Simulator App: Use NMI Test Card Simulator (Android) for NFC testing.
⚠️ Transactions in Test Mode never reach the processor.
📱 3. Install the Test Card Simulator (Android)
Requirements
- Android 5.0+ (API 21)
- NFC-enabled device
Installation Steps
- Download the ZIP file → Extract → Get the APK.
- Enable Unknown Sources in Android settings.
- Install the APK.
- Enable NFC in device settings.
- Open Card Simulator App.
- Set it as default payment app (
Settings > Tap & Pay > Default
).
Usage
- Select card type (Visa, Mastercard, etc.).
- Choose scenario: Approved, Declined, CVM (PIN/Signature/None).
- Tap phone to terminal.
- View result on terminal.
⚠️ Simulator is for testing only. No real payments.
🏦 4. Set Up Payment Gateway Account
- Register for a Gateway Account with your partner.
- Log in →
Settings > Security Keys
→ Generate API Key (API Source permissions only). - Keep your API Key safe.
🆔 5. Define Application Identifier
- Must be one unique value (company or app name).
- Allowed characters:
A–Z, 0–9
. - Same value must be used across all platforms.
- Cannot be changed once set.
📦 6. Install the Payment Device SDK
- Download the SDK
.zip
archive for Android. - Contents include:
- ChipDnaMobileJavaDemo – sample integration in Java.
- ChipDnaMobileKotlinDemo – sample integration in Kotlin.
- doc/ – API documentation.
- libs/ – Cloud Commerce SDK binaries for Tap to Pay.
SDK Versions
- Test AAR (
cloud-commerce-sdk-mtf
) – sandbox endpoints, debug mode. - Production AAR (
cloud-commerce-sdk
) – PCI compliant, minimal logging.
⚠️ Switching between Test and Production requires reinstall/clear storage.
⚙️ 7. Android Project Setup
Gradle Setup
- Add Cloud Commerce SDK module:
configurations.maybeCreate("default")
artifacts.add("default", file("./cloud-commerce-sdk-mtf-<version>.aar"))
In settings.gradle:
gradle
Copy
Edit
include ':<ModuleName>'
project(':<ModuleName>').projectDir = new File('<PathFromRepositoryRoot>')
In app/build.gradle, add dependencies (Retrofit, OkHttp, Play Integrity, Location, NFC, RxJava, etc. — see SDK docs).
⚠️ No references to org.apache.http.legacy allowed in build.gradle.
🔒 8. Android Permissions
Add required permissions in AndroidManifest.xml
:
INTERNET
,BLUETOOTH
,ACCESS_FINE_LOCATION
,NFC
, etc.READ_PHONE_STATE
for device identifiers.- Disable developer options and USB connection in production (per MPoC rules).
🏗️ 9. Extend Application Class
- Create a class extending
ChipDnaApplication
. - Override methods:
override fun onSDKInitializationSuccess() {
super.onSDKInitializationSuccess()
}
override fun onSDKInitializationFailed(errorMessage: String?) {
super.onSDKInitializationFailed(errorMessage)
}
- Register in AndroidManifest.xml under
<application android:name=".DevApplication">
.
📜 10. App Onboarding & Security
You must share onboarding data with NMI ([email protected]
):
- App Package Name
- Keystore Hash (SHA-256, Base64 encoded)
- Play Integrity Keys (via Google Play Console)
⚠️ App must pass attestation checks for Tap to Pay to function.
🌐 11. Network & Firewall Configuration
Allow SDK to communicate with:
- CardEaseXML (test & live IPs, port 443)
- CardEaseTMS (test & live IPs, port 443)
Ensure firewall is configured for these endpoints.
💳 12. Running a Tap to Pay Transaction
- Initialize SDK with API Key, App ID, Certificate Fingerprint.
- Connect & Configure using:
- Tap to Pay only →
TapToMobilePOI = TRUE, PaymentDevicePOI = FALSE
- Tap + External Device →
TapToMobilePOI = TRUE, PaymentDevicePOI = TRUE
- Tap to Pay only →
- Register RequestActivityListener (mandatory for NFC handling).
- Call startTransaction() with transaction details (amount, currency, etc.).
- SDK fires events:
transactionUpdate
applicationSelection
signatureVerification
transactionFinished
- Tap customer card/device on NFC antenna.
- Transaction auto-confirms (Tap to Pay only).
✅ 13. Transaction Results
APPROVED
– both acquirer + terminal approved.DECLINED
– either acquirer or terminal declined.VOIDED
– merchant or SDK voided the transaction.DELAYED
– offline encoded request for later processing.
🧾 14. Receipts
- Issued via SDK.
- Delivery: SMS or Email (device or central servers).
- Content is scheme-certified and cannot be modified.
📋 15. Compliance & Branding
- Must display EMVCo Contactless Symbol and supported card brand logos (Visa, Mastercard, AmEx, Discover, etc.).
- Symbols must meet EMVCo size, color, and positioning rules.
- Consistency and visibility are required for compliance.
🔥 You’re ready to integrate NMI Tap to Pay into your Android app.
Navigate through the pages in the developer portal for more details, including visual aids, flow diagrams, and code samples.
Updated 10 days ago