Environments
Payr provides separate sandbox and production environments for testing and live payments.
API and Iframe URLs
Sandbox
https://sandbox-api.mypayr.co.uk/thirdparty
https://sandbox.mypayr.co.uk
Production
https://api.mypayr.co.uk/thirdparty
https://mypayr.co.uk
Recommendation: Always test thoroughly in sandbox before moving to production.
Note: The SDK API Base URL is different, please refer to the below section.
SDK Configuration
To switch between sandbox and production environments in the SDK, you need to update two configuration parameters:
apiBaseUrl- The Payr API endpointenvironment- The environment mode
Environment Configuration Table
Environment
apiBaseUrl
environment
Sandbox (Testing)
https://sandbox-api.mypayr.co.uk
'sandbox'
Production (Live)
https://api.mypayr.co.uk
'production'
SDK Script URL (same for both):
Sandbox Example
Production Example
Important Notes
Match your environment:
Always use sandbox
apiBaseUrlwithenvironment: 'sandbox'Always use production
apiBaseUrlwithenvironment: 'production'Use tokens issued from the same environment (sandbox tokens for sandbox API, production tokens for production API)
Security:
Never hardcode production tokens in your frontend code
Issue tokens from your backend after user authentication
Before going live:
Test thoroughly in sandbox first
Remove any
debug: trueflags from production codeVerify your
apiBaseUrlandenvironmentare set to production values
Support
Need help with environment configuration? Contact support@mypayr.co.uk
Last updated

