Sandbox
Test your Elebne integration without real money using sandbox mode, magic amounts, and payment simulation.
Sandbox
Sandbox mode lets you build and test your integration without moving real money. Use test keys (pk_test_ / sk_test_) to access sandbox mode — everything else works the same as production.
Test vs live keys
| Test keys | Live keys | |
|---|---|---|
| Prefix | pk_test_ / sk_test_ | pk_live_ / sk_live_ |
| Real money | No | Yes |
| Same API endpoints | Yes | Yes |
Webhook sandbox flag | true | false |
| Customer notifications | No | Yes |
Both key types use the same base URL: https://api.elebne.ai/api/v1. The key prefix determines whether you are in sandbox or production mode.
Magic amounts
Use these special amounts (in centimes) to test specific scenarios:
| Amount (centimes) | Amount (MRU) | Behavior |
|---|---|---|
99901 | 999.01 | Simulates a payment failure |
99904 | 999.04 | Simulates a refund failure |
| Any other value | — | Normal payment flow |
Example — creating an intent that will fail on payment:
curl -X POST https://api.elebne.ai/api/v1/dev/intents \
-H "Authorization: Bearer sk_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: test-fail-$(date +%s)" \
-d '{"amount": 99901, "label": "Test failure"}'When you simulate payment on this intent, it will return a failure status instead of completing.
Sandbox shops
When you create products using test keys, they are placed in a hidden sandbox shop that is invisible to real customers browsing the Elebne marketplace. This lets you test your catalog sync without polluting your live storefront.
- Sandbox products, orders, and intents are completely isolated from production data.
- You can create, update, and delete sandbox products freely.
Simulating payments
In sandbox mode, you can simulate a customer completing a payment without needing a real Elebne wallet:
POST /dev/intents/:referenceNumber/simulate-paymentThis moves the payment intent from PENDING to COMPLETED (or FAILED if you used a magic amount) and fires the corresponding webhook events.
Simulating orders
Similarly, you can simulate a customer placing an order in your sandbox shop:
POST /dev/store/orders/simulateThis creates a test order and fires an order.new webhook event, letting you test your order fulfillment flow end-to-end.
Data retention
Sandbox data is automatically cleaned up after 30 days. If you need persistent test data, recreate it periodically or use your integration to seed it on demand.
Limitations
Sandbox mode has a few differences from production:
- No real money movement. Wallet balances are not affected.
- No customer notifications. Payers do not receive SMS or push notifications.
- No real settlement. Funds do not appear in the merchant's Elebne balance.
- Data expires. Sandbox data is cleaned after 30 days.
Same API, same code
Your integration code should be identical for sandbox and production. The only difference is the API key you use.
Next steps
- Webhooks — Test webhook delivery in sandbox mode
- Going Live — Checklist for switching to production
- Environments — Full comparison table
Was this page helpful?