Environments
Sandbox and production, their API keys, what sandbox simulates, and the rate limits.
Sandbox and production
| Sandbox | Production | |
|---|---|---|
| Purpose | Build and test your integration | Move real money |
| API key prefix | ak_test_ | ak_live_ |
| Providers | Simulated | The licensed Providers you are approved by |
| Base URL | Comes with your sandbox account | Comes with your production account |
Base URLs are not published here: you receive them with your account. The examples in these docs read them from environment variables:
export APEX_BASE_URL="<base URL of the environment>"
export APEX_API_KEY="ak_test_..." # ak_live_... in productionEach environment has its own account, API keys, webhook endpoints, Beneficiaries and balances. Nothing carries over from sandbox to production.
A key works only in its own environment. An ak_live_ key sent to sandbox, or an ak_test_ key sent to production, is refused with api_key_invalid (401).
What sandbox simulates
In sandbox the Providers are simulated. The API, its validation, its errors, your approval rules and the signed webhooks behave as in production; what changes is everything a Provider does:
- No money moves. Legs run on simulated Providers and complete without touching a bank or a blockchain.
- Prices are illustrative. Rates and Provider fees come from the simulated Providers, not from the market.
- Deposit instructions are placeholders.
GET /v1/deposit-instructionsanswers addresses that receive nothing. Ask your account team to credit test funds to your sandbox balance. - Quotes are short-lived. A sandbox Quote expires about a minute after it is made.
Beneficiaries you register are still reviewed by our compliance team before they can be paid, in sandbox as in production.
With no service fee on your account, the sandbox prices these payments as follows:
| You send | Beneficiary | They receive | How |
|---|---|---|---|
| 1000 USDC | Company in Germany (IBAN) | 918.58 EUR | 1 USDC conversion fee, 999 × 0.92, then 0.5 EUR SEPA Instant fee |
| 1000 EURC | Company in Germany (IBAN) | 998.5 EUR | 1 EURC conversion fee, 999 × 1, then 0.5 EUR SEPA Instant fee |
| 1000 USDC | Company in the UK | 788.71 GBP | 1 USDC conversion fee, 999 × 0.79, then 0.5 GBP Faster Payments fee |
| 1000 USDC | Company in the US | 998 USD | 1 USDC conversion fee, 999 × 1, then 1 USD RTP fee |
These routes start at the Provider holding your USDC or EURC, so the balance you send from must be held there (see held_at on GET /v1/balances).
Rate limits
The same limits apply in sandbox and production. Each is counted per second:
| Limit | Allowance |
|---|---|
| Per API key | 10 requests per second |
| Per account | 30 requests per second, across all its API keys and its people in the Customer panel |
| Per client IP address | 40 requests per second |
Responses to an API key carry the allowance of that key:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests per second the key may make |
X-RateLimit-Remaining | Requests left in the current window |
X-RateLimit-Reset | Seconds until the allowance is full again |
A request over any limit is refused with 429 and the rate_limited code. The Retry-After header says how many seconds to wait:
HTTP/1.1 429 Too Many Requests
Retry-After: 1
X-Correlation-ID: 0c4f8a2e-7b1d-4e93-a6c5-2d8f1b7e3a90
{
"code": "rate_limited",
"message": "Too Many Requests",
"correlation_id": "0c4f8a2e-7b1d-4e93-a6c5-2d8f1b7e3a90"
}Wait at least Retry-After seconds before you try again, and add some random jitter when several workers share a key. The per-account limit carries no allowance headers of its own, so a 429 can arrive while X-RateLimit-Remaining still shows room: honour Retry-After either way. Prefer webhooks over tight polling loops; they cost you no allowance.