Sandbox Environment
The HitPay sandbox environment allows developers to simulate payment flows without processing real transactions. It is essential for testing and debugging before moving to production.
Important Notes
- Sandbox and production are completely separate accounts
- You can use dummy business details when signing up for sandbox
- No verification or approval is required
- Choose Singapore as your business country
- The only payment methods supported in sandbox are PayNow and cards
Creating a Sandbox Account
1
Sign Up for a Sandbox Account
Visit the Sandbox Account Creation Page and enter test details (no real data required). Verify your email address to activate the account.
2
Access the Sandbox Dashboard
Log in at https://dashboard.sandbox.hit-pay.com/login. The interface is identical to production, but uses test data.
3
Set Up Payment Methods
Go to Settings → Payment Methods and enable PayNow and Card Payments for testing. Other payment methods are not available in sandbox.
4
Generate API Keys
Navigate to Settings → API Keys and generate new keys for use in development. Use these only with the sandbox API URL.
Sandbox Features
Supported Payment Methods
- Credit and debit cards
- PayNow (via QR code)
Simulated Behavior
- All transactions are test-only; no real charges occur
- Webhook events are triggered to your test endpoints
- API responses mirror the production system
Test Cards
Use the following card numbers to simulate various payment outcomes:Card Type | Number | Expiry | CVC | Description |
---|---|---|---|---|
Visa | 4242 4242 4242 4242 | Any future date | Any 3 digits | Successful payment |
Visa (Declined) | 4000 0000 0000 0002 | Any future date | Any 3 digits | Declined transaction |
Mastercard | 5555 5555 5555 4444 | Any future date | Any 3 digits | Successful payment |
American Express | 3782 822463 10005 | Any future date | Any 4 digits | Successful payment |
Test PayNow
To simulate a PayNow payment:- Start a transaction using the sandbox dashboard or API
- When prompted, a QR code will be generated
- Use your mobile phone camera (not the PayNow app) to scan the QR code
- The transaction will automatically simulate a successful payment
Webhook Configuration
- Use separate webhook URLs for sandbox and production environments
- Webhooks in sandbox are sent to your test endpoints
- Webhooks in production are sent to your live endpoints
If your system requires allowlisting for incoming webhooks, ensure the following IPs are permitted:
- Production Webhooks:
3.1.13.32
,52.77.254.34
- Sandbox Webhooks:
54.179.156.147
Switching Between Sandbox and Production
FAQs
How do I test for payment methods that are outside of Singapore?
How do I test for payment methods that are outside of Singapore?
Currently, it’s a limitation of the sandbox, and we are working to improve this. But all payment methods work exactly the same when it comes to integration. So if you can integrate with PayNow or cards using a Singapore business, all you need to do is switch to other methods in production by replacing the payment method parameter.
How do I test other payment methods apart from PayNow and cards?
How do I test other payment methods apart from PayNow and cards?
Currently, it’s a limitation. The sandbox environment only supports PayNow and card payments for testing purposes. However, all payment methods work exactly the same when it comes to integration. So if you can integrate with PayNow or cards using a Singapore business, all you need to do is switch to other methods in production by replacing the payment method parameter.
Can I convert my Sandbox account to production?
Can I convert my Sandbox account to production?
No, they are separate accounts. Sandbox and production environments are completely independent, and you cannot convert between them. You’ll need to create a separate production account when you’re ready to go live.