Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Environments

Payr provides separate sandbox and production environments for testing and live payments.


API and Iframe URLs

Environment
API Base URL
Iframe URL

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:

  1. apiBaseUrl - The Payr API endpoint

  2. environment - 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 apiBaseUrl with environment: 'sandbox'

  • Always use production apiBaseUrl with environment: '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: true flags from production code

  • Verify your apiBaseUrl and environment are set to production values


Support

Need help with environment configuration? Contact support@mypayr.co.uk

Last updated