Sandbox vs Production
Orsunpay provides separate environments for testing and live transactions. Understanding the differences between these environments is crucial for proper integration and testing.Environment Overview
| Aspect | Sandbox | Production |
|---|---|---|
| Purpose | Testing and development | Live transactions |
| API Keys | sk_test_... | sk_live_... |
| Money Movement | No real money | Real money processing |
| Payment Providers | Test/Mock providers | Live providers |
| Rate Limits | 1000 requests/minute | 5000 requests/minute |
| Data Retention | 30 days | Permanent |
Base URLs
API Endpoints
Checkout URLs
BackOffice
API Key Differences
Sandbox Keys
- Format:
sk_test_abc123... - Access: Sandbox environment only
- Security: Less stringent for testing
- Regeneration: Can be regenerated freely
Production Keys
- Format:
sk_live_abc123... - Access: Production environment only
- Security: High security requirements
- Regeneration: Requires verification process
Transaction Behavior
Sandbox Transactions
Test Cards
Use these test card numbers in sandbox:| Card Number | Brand | Result | Error Code |
|---|---|---|---|
4242424242424242 | Visa | Success | - |
5555555555554444 | Mastercard | Success | - |
4000000000000002 | Visa | Declined | card_declined |
4000000000009995 | Visa | Declined | insufficient_funds |
4000000000000069 | Visa | Expired | expired_card |
4000000000000127 | Visa | Incorrect CVC | incorrect_cvc |
4000000000000119 | Visa | Processing Error | processing_error |
You can use any future expiry date and any 3-digit CVC for test cards.
Alternative Payment Methods Testing
PayPal Sandbox
Bank Transfer Testing
Webhook Testing
Sandbox Webhooks
Sandbox webhooks are triggered immediately for testing purposes:Webhook Development Tools
Use tools like ngrok for local webhook testing:Rate Limits
Sandbox Limits
- General API: 1,000 requests per minute
- Burst Limit: 100 requests per second
- Webhook Retries: 5 attempts over 24 hours
Production Limits
- General API: 5,000 requests per minute
- Burst Limit: 500 requests per second
- Webhook Retries: 10 attempts over 48 hours
Data Differences
Sandbox Data
- Retention: 30 days rolling
- Reset: Data can be cleared upon request
- Privacy: Lower privacy requirements
- Compliance: Testing compliance flows
Production Data
- Retention: Permanent (per regulatory requirements)
- Backup: Multiple geographic backups
- Privacy: Full PCI DSS and GDPR compliance
- Compliance: Live compliance monitoring
Feature Availability
Feature Parity
Most features are available in both environments: ✅ Available in Both- Transaction creation and processing
- Webhook notifications
- Customer management
- Payment method routing
- Error handling and retries
- Limited payment provider sandbox availability
- Simplified 3DS flows
- Mock risk scoring
- Test-only payment methods
- Real money processing
- Full compliance monitoring
- Advanced fraud detection
- Priority support channels
Testing Strategies
Unit Testing
Test your integration logic with mocked responses:Integration Testing
Use sandbox environment for end-to-end testing:Load Testing
Test your integration under load in sandbox:Migration Checklist
Before moving to production:Code Review
- Remove all test API keys
- Update base URLs to production
- Verify webhook endpoint security
- Test error handling thoroughly
Configuration
- Set production API keys in environment variables
- Update webhook URLs to production endpoints
- Configure proper logging and monitoring
- Set up alerting for failures
Testing
- Complete end-to-end testing in sandbox
- Test webhook signature verification
- Verify error scenarios handle gracefully
- Load test your webhook endpoints
Security
- Audit API key storage and rotation
- Verify HTTPS enforcement
- Check webhook signature validation
- Review access logs and monitoring
Monitoring and Debugging
Sandbox Tools
- Transaction logs: Detailed debugging information
- Webhook inspector: Real-time webhook monitoring
- API explorer: Interactive API testing
- Event timeline: Step-by-step transaction flow
Production Monitoring
- Dashboard metrics: Real-time performance monitoring
- Alert notifications: Automated failure detection
- Audit logs: Comprehensive activity tracking
- Health checks: Proactive system monitoring
Best Practices
Development Workflow
- Develop against sandbox environment
- Test thoroughly with various scenarios
- Deploy to staging with production-like data
- Migrate to production with proper configuration
Environment Separation
Error Handling
Support and Resources
Sandbox Support
- Documentation: This comprehensive guide
- Community: Developer Discord channel
- Email: [email protected]
Production Support
- Dedicated support: Priority response times
- Phone support: 24/7 for critical issues
- Email: [email protected]
- Status page: https://status.orsunpay.com
Production support includes proactive monitoring and faster response times for business-critical issues.

