API Environments

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.

EnvironmentBase URLUse Case
Sandboxhttps://api.sandbox.international.pagseguro.comTesting and validation
Productionhttps://api.international.pagseguro.com/payoutsLive 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.