The sandbox environment is a full-featured testing platform that mirrors production functionality without financial risk. It provides realistic test data, simulates all transaction states, and supports complete integration testing. Using the sandbox effectively accelerates development, reduces production issues, and ensures reliable integrations.
Sandbox access is obtained by contacting support@phaze.io. After verification, you’ll receive API credentials including an API key and secret key. These credentials are separate from production keys and have no financial value, allowing safe experimentation. The sandbox environment uses the same API endpoints and authentication methods as production, ensuring your integration code works identically in both environments.
Test data in the sandbox includes realistic brand catalogs, pricing information, and transaction responses. You can test purchases for various brands, denominations, and countries without actual financial transactions. The sandbox simulates successful transactions, failures, delays, and edge cases, allowing comprehensive testing of your application’s error handling and user experience flows.
Transaction simulation covers the complete lifecycle. You can test purchase requests that succeed immediately, transactions that process with delays, and various failure scenarios including insufficient balance, brand unavailability, and network errors. This comprehensive simulation ensures your application handles all possible outcomes gracefully before production deployment.
Webhook testing in sandbox requires a publicly accessible endpoint. Use tools like ngrok during development to expose local endpoints, or deploy a test webhook handler to a staging environment. Sandbox webhooks use the same signature verification as production, allowing you to test your webhook processing logic thoroughly. All webhook event types are available in sandbox, enabling complete workflow testing.
Integration testing should cover multiple scenarios: successful purchases across different brands and countries, failure handling for various error codes, webhook processing for all event types, and edge cases like duplicate requests or network timeouts. The Postman collection includes example requests for common scenarios, but you should also test your specific use cases.
Performance testing in sandbox helps validate your integration’s scalability. While sandbox may have different performance characteristics than production, you can test your application’s handling of API response times, webhook processing speed, and concurrent request management. This helps identify potential bottlenecks before production deployment.
Error scenario testing is crucial for production readiness. The sandbox supports testing various error conditions: invalid API keys, malformed requests, signature verification failures, and transaction-specific errors. Your application should handle all error responses gracefully, providing appropriate user feedback and logging for debugging. Test both expected errors and unexpected scenarios to ensure robust error handling.
Data validation testing ensures your application correctly processes API responses. Verify that transaction IDs are stored correctly, status updates are reflected accurately, and webhook events trigger appropriate actions. Test with various response formats and edge cases to ensure your parsing logic is robust. The sandbox provides consistent response formats matching production, enabling reliable validation.
Security testing should verify your implementation of signature generation and verification. Test that your signature generation produces correct results for various request types, and that webhook signature verification correctly identifies authentic and tampered requests. Verify that secret keys are stored securely and never exposed in logs or error messages.
User experience testing involves simulating complete user flows. Test the entire journey from brand selection through transaction completion, including loading states, error messages, and success confirmations. Verify that your UI provides clear feedback at each step and handles edge cases gracefully. The sandbox’s realistic simulation helps identify UX issues before production deployment.
Production readiness checklist includes completing all sandbox testing scenarios, verifying webhook endpoints are production-ready, confirming API key rotation procedures, and reviewing error handling and logging. Phaze provides a production readiness review for enterprise customers, helping ensure smooth transition from sandbox to production.
Ongoing sandbox usage supports continuous development. Use sandbox for testing new features, validating API updates, and reproducing production issues in a safe environment. The sandbox environment is always available for testing, making it a valuable tool throughout your product development lifecycle, not just during initial integration.