SettlraSettlra/Docs
DashboardAPI Playground

Sandbox vs Production

Settlra provides two fully separate environments. Always develop and test against the sandbox before switching to production.

Environment comparison

FeatureSandboxProduction
Base URLhttps://api-sandbox.settlra.com/v1https://api.settlra.com/v1
API key prefixsk_sandbox_sk_live_
Real moneyNoYes
Real USDC depositAuto-simulatedRequired on-chain
Real mobile moneyNo — simulatedYes — real transfers
KYC requiredNoYes (TIER_1 minimum)
Compliance screeningMockedFull AML + sanctions
Rate limitsRelaxed (500 req/min)Standard (100 req/min)

Sandbox behavior

In the sandbox, all payouts succeed automatically. There is no need to send real USDC — after you create a payout, the sandbox simulates a deposit confirmation within a few seconds and marks the payout as SETTLED.

Sandbox webhooks fire to your configured endpoint the same way production webhooks do, making it easy to test your event handling end-to-end.

Test phone numbers

Use these phone numbers in sandbox to test different payout outcomes:

Phone numberNetworkSandbox behavior
+256700000001MTN_UGAlways succeeds — settled in ~3s
+256700000002MTN_UGFails with PROVIDER_ERROR after 5s
+256700000003MTN_UGTriggers compliance hold
+256752000001AIRTEL_UGAlways succeeds — settled in ~3s
+254700000001MPESA_KEAlways succeeds — settled in ~5s
+254700000002MPESA_KEFails with INVALID_RECIPIENT

Switching to production

Before going live, complete these steps:

  1. Complete KYC verification in the dashboard (required for TIER_1 access at minimum).
  2. Generate a sk_live_ API key from the dashboard.
  3. Update your base URL and API key environment variables.
  4. Register your webhook endpoint (production endpoint must use HTTPS).
  5. Test with a small live amount before scaling up.
bash
"color:#8b949e"># Sandbox
"color:#ff7b72">export SETTLRA_API_KEY="sk_sandbox_your_sandbox_key"
"color:#ff7b72">export SETTLRA_BASE_URL="https://api-sandbox.settlra.com/v1"

"color:#8b949e"># Production
"color:#ff7b72">export SETTLRA_API_KEY="sk_live_your_production_key"
"color:#ff7b72">export SETTLRA_BASE_URL="https://api.settlra.com/v1"

Configuring your client for both environments

settlra-client.jsjavascript
"color:#ff7b72">const SETTLRA_BASE_URL = process.env.NODE_ENV === 'production'
  ? 'https://api.settlra.com/v1'
  : 'https://api-sandbox.settlra.com/v1';

"color:#ff7b72">export "color:#ff7b72">async "color:#ff7b72">function settlraRequest(path, options = {}) {
  "color:#ff7b72">const response = "color:#ff7b72">await fetch(`${SETTLRA_BASE_URL}${path}`, {
    ...options,
    headers: {
      'Authorization': `Bearer ${process.env.SETTLRA_API_KEY}`,
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

  "color:#ff7b72">if (!response.ok) {
    "color:#ff7b72">const error = "color:#ff7b72">await response.json();
    "color:#ff7b72">throw "color:#ff7b72">new Error(`Settlra API error: ${error.error} — ${error.message}`);
  }

  "color:#ff7b72">return response.json();
}