Testing / Sandbox
Learn how to validate your integration using the sandbox environment and testing tools.
Enable Sandbox Mode
To start testing your integration without processing real payments, you must initialize the SDK in demo mode. This ensures that all transactions are routed to the sandbox environment and no real money is moved.
// Initialize with demo = true
AcceptSDK.initialize(
context = applicationContext,
token = AcceptSDKDEMO_TOKEN, // or your sandbox merchant token
demo = true
)Simulate Transaction Outcomes
In the sandbox environment, the outcome of a transaction is determined by the decimal part of the transaction amount. Use these specific amounts to test how your application handles different scenarios.
| Decimal Amount | Outcome | Description |
|---|---|---|
.82 (e.g., 10.82) | Approved | Simulates a successful transaction. |
.83 (e.g., 10.83) | Declined | Simulates a generic decline. |
.84 (e.g., 10.84) | Refunded | Simulates a refund of transaction. |
.85 (e.g., 10.85) | Failed | Simulates a gateway or network error. |
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.
Test with Tapaya Accept Testing Tool
Availability
Testing tool is right now available only for early adopters.
To test NFC payments without using physical cards, use the Tapaya Accept Testing Tool. This is an HCE (Host Card Emulation) Android app that simulates a contactless card.
- Install the Tool: Download and install the "Tapaya Accept Testing Tool" on a secondary Android device with NFC.
- Configure Card: Open the app and select a test card profile (e.g., Visa, Mastercard).
- Perform Transaction: Initiate a payment in your app and tap the testing device against the back of your terminal device.