Sandbox
Secure testing environment for debugging integration with the payment gateway
What is a sandbox
The MoonlightPay sandbox is a fully functional test environment that allows developers to safely test integration with the payment gateway without using real money and bank cards.
The test environment fully replicates the functionality of the production environment, including all stages of payment processing, response codes, and API behavior. This allows you to fully test your integration before moving to real payments.
How to start working with the sandbox
To send requests to the sandbox, use the base URL:
https://sandbox.moonlightpay.net
All other request parameters, data structure, headers, and authentication methods work exactly the same as in the production environment. Just replace the base URL with the sandbox URL in your code.
Credentials for accessing the sandbox (client identifiers, point of sale identifiers, secret keys) are provided separately and differ from production ones. Contact your manager to obtain test keys.
Sandbox capabilities
In the sandbox, you can test:
- Creating payments with various parameters
- Processing of successful and unsuccessful transactions
- Working with 3D Secure authentication
- Receiving payment statuses and notifications
- Refund operations
- Auto-payments (recurring payments)
- Processing of various error types
Sandbox limitations
Currently, the sandbox only supports payments by bank cards. Other payment methods (e-wallets, bank transfers, cryptocurrencies) will be added soon.
All operations in the sandbox are simulations and do not involve real financial transactions. No funds are debited or credited.
Test bank cards
To simulate various payment processing scenarios, use special test card numbers. Each number is designed to test specific system behavior.
When using test cards, you can specify any:
- Expiration date — any future date in MM/YY format
- Cardholder name — any name in Latin letters
- CVC/CVV code — any three-digit or four-digit combination of numbers
The payment processing result will depend exclusively on the card number:
5467929858074128
5538300838605560
5529263272356119
5569191777864116
4750657776370372
5124585563456201
3D Secure in the sandbox
For cards with 3D Secure support, the sandbox provides a simplified authentication page. On the 3DS test page, you can choose one of the options:
- Successful authentication — payment will be processed according to the test card type
- Authentication rejection — payment will be declined with the corresponding error code
- Authentication timeout — simulates a situation when the user did not complete the 3DS procedure
This allows you to test various user behavior scenarios during 3D Secure authentication.
Testing notifications
The sandbox fully supports sending webhook notifications to your callback URLs. This allows you to test the processing of asynchronous notifications about payment status changes.
For cards with delayed status changes (numbers ending with "...838605560" and "...776370372"), notifications will be sent 5-10 seconds after payment creation, simulating real banking system delays.
Transition to production environment
After completing testing in the sandbox, to transition to the production environment, you need to:
- Replace the base URL from
$https://sandbox.moonlightpay.net
to$http://localhost:8085
- Use production credentials (client_id, product_id, secret_key)
- Make sure that all test card numbers are replaced with real user data
- Verify the correct configuration of the callback URL for receiving notifications
All the rest of the integration code remains unchanged.
Technical support
If you have questions while working with the sandbox or need additional test scenarios, contact our technical support:
- Email: support@moonlightpay.net
- Telegram: @moonlightpay_support
- API Documentation: Full description of methods