Sandbox & test values

The sandbox is a fully isolated environment (separate database) running the Simulator rail. Use it to build and test without moving real money.

  • Base URL: https://api-sandbox.starpay.example
  • Keys: sk_test_… only (live keys are rejected here)

Magic values

The instrument you send drives a deterministic outcome:

Mobile money (msisdn)

Number Outcome
0240000000 Success
0240000001 Insufficient funds
0240000002 Times out on the first attempt, then succeeds (exercises provider failover)

Card

Card number Outcome
4084 0840 8408 4081 Success
4084 0840 8408 4082 Declined

Recurring billing (Phase 3)

A successful sandbox card payment tokenizes automatically; the captured token drives recurring-cycle outcomes:

Value Outcome
tok_sim_ok Every recurring charge succeeds (captured from card …4081)
tok_sim_retry The first charge fails (insufficient_funds), the retry succeeds — exercises retry → recovery
tok_sim_fail Every charge declines — exercises dunning → exhaustion → cancellation

MoMo mandates (silent debits, opt-in on the subscribe page):

MSISDN Outcome
0240000000 Mandate approved; every silent debit succeeds
0240000001 Subscriber declines the mandate (subscription falls back to per-cycle prompts)
0240000003 Mandate approved but every silent debit declines — exercises past-due → dunning

Name enquiry: any instrument ending 0001 returns "no match" (used e.g. when verifying a campaign beneficiary).

These let you assert success, failure, and failover paths end-to-end before going live. Webhooks fire in the sandbox exactly as they do in production.