Skip to navigation

Sandbox and Live Mode

Stakaba uses two modes — sandbox and live — controlled by which API key you send.

Sandbox mode

Use your sandbox key (sk_test_...) for all development and testing.

  • No real money moves
  • Simulated provider responses
  • Test transactions never appear in live reports
  • Use the number 255000000001 to simulate a failed payment
POST /api/v1/payments/collection
x-api-key: sk_test_your_sandbox_key

Live mode

Use your live key (sk_live_...) in production.

  • Real money moves
  • Requires an approved merchant account
  • All transactions are visible in your dashboard and audit trail
POST /api/v1/payments/collection
x-api-key: sk_live_your_live_key

Sandbox test numbers

PhoneResult
Any valid Tanzanian numberSimulated success
255000000001Simulated failure

Going live

  1. Complete your business profile in the dashboard
  2. Submit a go-live request (KYC documents)
  3. Stakaba reviews and approves your account (typically 1–3 business days)
  4. Your live API key activates — swap it in your environment variables

Keeping keys separate

Store keys as environment variables. Never hard-code them.

# .env
STAKABA_API_KEY=sk_test_... # development
STAKABA_API_KEY=sk_live_... # production