PagSeguro provides two environments for interacting with the APIs available:
- Sandbox: For development and testing.
- Production: For live payment and payouts.
Each environment has its own base URL and separate credentials to ensure safety and control throughout the integration process.
Environment | Base URL | Use Case |
---|---|---|
Sandbox | https://api.sandbox.international.pagseguro.com | Testing and validation |
Production | https://api.international.pagseguro.com/payouts | Live payout operations |
Credentials
The credentials used in the Sandbox environment are different from those used in Production.
After onboarding is complete, you will receive distinct API key pairs for each environment.
Use only the credentials appropriate to the environment you are working in.
Sandbox
The Sandbox environment is a controlled space for safely testing your integration. You can simulate payments and payout scenarios and validate your implementation without affecting real users or live accounting.
This is ideal for:
- Exploring endpoint functionality
- Testing success and failure cases
Always Test in Sandbox First
Running tests directly in Production may lead to financial losses, invalid data creation, or API degradation.
Production
The Production environment is where real payments and payouts are processed and accounted. You should only switch to Production after youโve completed all integration tests in Sandbox and received go-live approval.
All operations in Production are real and irreversible.
Avoid running untested logic in this environment.