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 SettingsAPI 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 TypeNumberExpiryCVCDescription
Visa4242 4242 4242 4242Any future dateAny 3 digitsSuccessful payment
Visa (Declined)4000 0000 0000 0002Any future dateAny 3 digitsDeclined transaction
Mastercard5555 5555 5555 4444Any future dateAny 3 digitsSuccessful payment
American Express3782 822463 10005Any future dateAny 4 digitsSuccessful 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

IP Addresses to Allowlist
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

# API Endpoints and Variables

# Sandbox
HITPAY_API_KEY=your_sandbox_api_key
HITPAY_API_URL=https://api.sandbox.hit-pay.com

# Production
HITPAY_API_KEY=your_production_api_key
HITPAY_API_URL=https://api.hit-pay.com

FAQs