Testing / Sandbox
Learn how to validate your integration using the sandbox environment.
Physical device required
Tap to Pay cannot be tested on an emulator. The SDK performs device integrity checks and will fail to initialize on emulators, rooted devices, or devices with unlocked bootloaders; see Supported Devices for the full hardware requirements. Sandbox mode still requires a physical, NFC-capable device; only the funds movement is simulated.
Enable Sandbox Mode
To start testing your integration without processing real payments, you must initialize the SDK against the sandbox environment. This ensures that all transactions are routed to the sandbox environment and no real money is moved.
// Sandbox is the default (isProduction = false)
Accept.initialize(context = applicationContext)Test PIN Entry
To test the PIN entry flow in the sandbox environment, initiate a transaction with a high amount. Amounts above the contactless cardholder verification limit require a PIN, so the on-glass PIN entry screen will appear.
Amount Format
Remember that the SDK typically accepts amounts in the smallest currency unit (integers).
To test 10.05, you would pass 1005 as the amount.
Simulate Specific Card Outcomes
The sandbox environment reserves a set of amounts that deterministically trigger a specific response code.
Use these to exercise failure paths without needing a real declined card. Pass the amount in the currency's
smallest unit as usual (e.g. 1.01 becomes 101).
| Amount | Response Code | Scenario |
|---|---|---|
1.01 | 00 | Approved |
1.07 | 06 | Card Authentication Rejected |
6.05 | 54 | Expired Card |
6.06 | 55 | Incorrect PIN |
8.06 | 75 | PIN Tries Exceeded |