Skip to main content
Therius routes every request to either the sandbox or the production environment based solely on the prefix of the API key you send. There is no environment flag, no separate SDK initialization option, and no configuration file to change. When you are ready to go live, you swap the key prefix and update the base URL — nothing else.

Sandbox

The sandbox environment is a fully isolated test environment backed by a test-provider stub. No real card networks are involved, no real money moves, and no real accounts are charged. Use it freely during development and for automated testing pipelines.

Sandbox Test Cards

Use any future expiry date, any cardholder name, and any 3-digit CVV (4 digits for Amex).

Full testing reference

Every test card by network, decline scenarios by reason, the complete 3D Secure walkthrough, and APM sandbox responses.

Production

The production environment processes real payments over live card networks. Every charge is real, every refund affects real accounts, and every declined transaction is a real issuer decision.

Sandbox vs Production at a Glance

Switching Environments

To move from sandbox to production, make two changes in your configuration:
  1. Replace prv_sandbox_... with prv_production_... (and pub_sandbox_... with pub_production_...).
  2. Update the base URL from https://api-sandbox.therius.io/v1 to https://api.therius.io/v1.
No other code changes are required. The same request bodies, the same response shapes, and the same endpoint paths work in both environments.
Before switching to production, verify that every mutating request in your code sends an Idempotency-Key header. In the sandbox this is optional; in production it is required to prevent duplicate charges on network retries.

The X-Environment Header

Most API calls authenticate via a key, and the key prefix determines the environment. However, some flows — such as GET /payment/inquiry/{id} reached from the pending_3ds resume flow — may be called without a key. In those cases, pass the X-Environment header to tell Therius which environment to route the request to.
Valid values are sandbox and production. When you include an API key, you do not need this header — the key prefix takes precedence.