Get started
Sandbox and live
SaphraONE runs two separate environments. Build and test in the sandbox, then switch your server to live keys and the live API. Nothing you do in one affects the other.
| Sandbox | Live | |
|---|---|---|
| Developer portal | sandbox.developers.saphra.one | developers.saphra.one |
| API base URL | https://sandbox.api.saphra.one/v1 | https://api.saphra.one/v1 |
| Secret keys | sk_test_… | sk_live_… |
| Session ids | cs_test_… | cs_live_… |
| livemode | false | true |
| Network | Arc testnet | Arc mainnet |
| Money | Test USDC and EURC from the faucet | Real USDC and EURC |
| Account | Your sandbox SaphraONE account | Your SaphraONE account |
| Business verification | Not needed | Required before creating a live key |
| Redirect URLs | https, or http://localhost | https only |
Switching environments
Use the Sandbox / Live switch at the top of every page of this portal. It opens the same page in the other environment: the console there shows that environment’s keys and payments, and the docs show that environment’s URLs in every code sample.
You sign in to both with the same methods (email, Google or a wallet). Each environment has its own accounts and data, the same way SaphraONE’s test app and live app do, so the first time you open the sandbox you set up a sandbox Business account.
Using a key in the wrong environment
A test key sent to the live API (or a live key to the sandbox) is refused with 401 and the code api_key_wrong_mode. The message names the right base URL, so the fix is obvious from your logs.
Keep the environment in config
Read both the key and the base URL from your environment, so the same code runs in every stage:
# Staging and local development
SAPHRA_API_BASE=https://sandbox.api.saphra.one/v1
SAPHRA_SECRET_KEY=sk_test_…
# Production
SAPHRA_API_BASE=https://api.saphra.one/v1
SAPHRA_SECRET_KEY=sk_live_…Next: Accept a payment. Reference: API overview.
