Skip to Content
Docs

Environments

Sandbox and live environments, with their API base URLs, Pay.com.js URLs, and key prefixes.

Pay.com provides two environments: the sandbox for building and testing your integration, and live for real transactions.

Base URLs

Send requests to the base URL for the environment you're working in.

EnvironmentAPI base URLPay.com.js scriptAPI key prefix
Sandboxhttps://api.sandbox.pay.com/v1https://js.pay.com/v1sk-pay-com-sandbox-…
Livehttps://api.pay.com/v1https://js.pay.com/v1sk-pay-com-live-…

Your API key must match the environment. Sending a sandbox key to the live URL (or a live key to the sandbox URL) returns 401 Unauthorized. See API keys.

Pay.com.js is one script for both environments. It works in the environment of the session you give it. With @pay-com/js, pass live: true in live.

Sandbox

Use the sandbox to develop and validate your integration without reaching real banking networks or moving real funds.

See Test your integration for sandbox testing workflows.

Live

Live processes real transactions on banking networks. Pay.com turns on live for your account after onboarding and underwriting are complete. Create a live key, switch your base URL from https://api.sandbox.pay.com/v1 to https://api.pay.com/v1, and follow the Go live checklist.

Requests made with a live API key move real money. Keep live keys in a secrets manager, roll them immediately if they're compromised, and never use them in development or test systems.

Was this page helpful?