Environments
Comparison of sandbox and production environments in the Elebne Developer API.
Environments
The Elebne Developer API has two environments: Sandbox and Production. Both share the same base URL — your API key determines which environment you operate in.
Comparison
| Sandbox | Production | |
|---|---|---|
| Base URL | https://api.elebne.ai/api/v1 | https://api.elebne.ai/api/v1 |
| Key prefix | pk_test_ / sk_test_ | pk_live_ / sk_live_ |
| Real money | No | Yes |
| Customer notifications | No | Yes |
| Settlement | Simulated | Real (instant to Elebne balance) |
Webhook sandbox flag | true | false |
| Simulate endpoints | Available | Not available |
| Data retention | 30 days | Permanent |
| Rate limits | 100 req/min | 1000 req/min |
| Commission | 2% (simulated) | 2% (real) |
Same URL, different mode
Both environments use the same base URL:
https://api.elebne.ai/api/v1The API reads your key prefix to determine the environment:
sk_test_...orpk_test_...routes to sandboxsk_live_...orpk_live_...routes to production
This means switching from sandbox to production requires only changing your API key — no URL changes, no code changes.
Environment-specific behavior
Simulate endpoints
Sandbox provides simulation endpoints that do not exist in production:
| Endpoint | Purpose |
|---|---|
POST /dev/intents/:ref/simulate-payment | Simulate a customer paying an intent |
POST /dev/store/orders/simulate | Simulate a customer placing an order |
These endpoints return 404 when called with live keys.
Webhook sandbox flag
Every webhook payload includes a sandbox boolean field:
{
"event": "payment.confirmed",
"sandbox": true,
"data": { ... }
}Use this flag if you share a single webhook endpoint between environments. You can route sandbox events to your staging processing pipeline and production events to your live pipeline.
Data isolation
Sandbox and production data are completely isolated:
- A payment intent created with
sk_test_cannot be retrieved withpk_live_ - Products created with test keys exist only in your sandbox shop
- Webhook endpoints registered with test keys only receive sandbox events
Recommended setup
For most integrations, we recommend:
- Development — Use test keys (
sk_test_) with local webhook endpoints via ngrok. - Staging — Use test keys with your staging server webhook URLs.
- Production — Use live keys (
sk_live_) with your production server webhook URLs.
Store keys in environment variables and switch between environments by changing the configuration:
# .env.development
ELEBNE_SECRET_KEY=sk_test_YOUR_KEY
# .env.production
ELEBNE_SECRET_KEY=sk_live_YOUR_KEYNext steps
- Quickstart — Make your first API call
- Sandbox — Magic amounts and simulation details
- Going Live — Production readiness checklist
Was this page helpful?