Environment Overview
Sandbox Environment
Test your integration without affecting real data or processing actual payments
Live Environment
Production environment for real customers and actual payment processing
Sandbox Environment
The sandbox environment is a complete, fully-functional replica of the live environment where you can test your integration without any risk.Accessing Sandbox
- Platform Dashboard: https://platform.sandbox.paygentic.io
- API Base URL:
https://api.sandbox.paygentic.io
Key Features
- Same Login Credentials: Use the same email and password as your live environment account
- Isolated Data: All data is completely separated from the live environment
- Unique IDs: All resource IDs (customers, subscriptions, products, etc.) are unique to sandbox
- Feature Parity: Sandbox has complete feature parity with the live system
- Test API Keys: API keys are prefixed with
sk_test_and only work in sandbox
While you use the same login credentials for both environments, all data, API keys, and resource IDs are completely separate between sandbox and live.
When to Use Sandbox
Use the sandbox environment to:- Test your integration during development
- Validate new features before deploying to production
- Experiment with pricing models and configurations
- Train team members on the platform
- Debug issues without affecting real customers
- Run automated integration tests
Live Environment
The live environment is your production environment where real transactions occur.Accessing Live
- Platform Dashboard: https://platform.paygentic.io
- API Base URL:
https://api.paygentic.io
Key Features
- Production Data: Real customers and actual payment processing
- Live API Keys: API keys are prefixed with
sk_live_and only work in live - Real Payments: All transactions process actual payments
API Keys and Environments
API keys are environment-specific and identified by their prefix:| Environment | API Key Prefix | Example |
|---|---|---|
| Sandbox | sk_test_ | sk_test_abc123... |
| Live | sk_live_ | sk_live_xyz789... |
Key Restrictions
- Sandbox keys (
sk_test_) can only be used withhttps://api.sandbox.paygentic.io - Live keys (
sk_live_) can only be used withhttps://api.paygentic.io - Using a key with the wrong environment will result in authentication errors
Sandbox API Request
Live API Request
Best Practices
Development Workflow
- Develop in Sandbox: Build and test your integration in sandbox first
- Use Environment Variables: Store API keys and base URLs in environment variables
- Automated Testing: Run integration tests against sandbox in your CI/CD pipeline
- Validate Changes: Test all changes in sandbox before deploying to live
- Monitor Both Environments: Set up monitoring for both environments
Security Considerations
- Never commit API keys to version control
- Use separate API keys for each environment
- Rotate keys regularly in both environments
- Restrict live API keys to production servers only
- Use sandbox keys for local development and testing
Switching Between Environments
To switch between environments:- Update API Key: Use the appropriate
sk_test_orsk_live_key - Update Base URL: Point to the correct API endpoint
- Verify Environment: Check that you’re working with the intended environment before making changes
Data Synchronization
When moving from sandbox to live:- You’ll need to recreate products, plans, and pricing configurations in live
- Customer data must be created fresh in live
- Usage events and billing history are separate in each environment
- API keys and webhooks must be configured separately
Troubleshooting
Wrong API Key for Environment
Error Response
sk_test_ for sandbox, sk_live_ for live) and the matching API base URL.