ElebneElebneDocs
Getting Started

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

SandboxProduction
Base URLhttps://api.elebne.ai/api/v1https://api.elebne.ai/api/v1
Key prefixpk_test_ / sk_test_pk_live_ / sk_live_
Real moneyNoYes
Customer notificationsNoYes
SettlementSimulatedReal (instant to Elebne balance)
Webhook sandbox flagtruefalse
Simulate endpointsAvailableNot available
Data retention30 daysPermanent
Rate limits100 req/min1000 req/min
Commission2% (simulated)2% (real)

Same URL, different mode

Both environments use the same base URL:

https://api.elebne.ai/api/v1

The API reads your key prefix to determine the environment:

  • sk_test_... or pk_test_... routes to sandbox
  • sk_live_... or pk_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:

EndpointPurpose
POST /dev/intents/:ref/simulate-paymentSimulate a customer paying an intent
POST /dev/store/orders/simulateSimulate 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 with pk_live_
  • Products created with test keys exist only in your sandbox shop
  • Webhook endpoints registered with test keys only receive sandbox events

For most integrations, we recommend:

  1. Development — Use test keys (sk_test_) with local webhook endpoints via ngrok.
  2. Staging — Use test keys with your staging server webhook URLs.
  3. 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_KEY

Next steps

  • Quickstart — Make your first API call
  • Sandbox — Magic amounts and simulation details
  • Going Live — Production readiness checklist

Was this page helpful?

On this page