Skip to main content
Test the entire API safely — every call is simulated, so nothing is charged and no service is delivered. There are two ways to switch into test mode:

Sandbox URL

Send your requests to https://sandbox.mysubwallet.ng with your normal API key.

Sandbox key

Or use your sk_test_… key against the normal https://api.mysubwallet.ng URL.
Both behave identically. Your keys are on the Pricing & Plan IDs page of your dashboard.

Base URLs

EnvironmentBase URLEffect
Productionhttps://api.mysubwallet.ngReal transactions — your wallet is charged.
Sandboxhttps://sandbox.mysubwallet.ngTest mode — simulated, never charges your wallet.

Example

Just point the request at the sandbox URL — everything else stays the same:
curl -X POST "https://sandbox.mysubwallet.ng/api/data" \
  -H "Authorization: Token your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "network": 1,
    "phone": "2347013397088",
    "data_plan": 19,
    "request-id": "Test_1"
  }'
Sandbox response
{
  "status": "success",
  "message": "[SANDBOX] Test transaction successful. No wallet was charged.",
  "request-id": "Test_1",
  "sandbox": true,
  "system": "SANDBOX"
}
Purchases are simulated. Read-only endpoints — Check Balance, validation, and the catalogs — return your real data on the sandbox URL too, so you can validate against real plan IDs and customer lookups.
In the API playground, pick Sandbox from the server dropdown to send test calls without leaving the docs.

Simulate a failure

Add "sandbox_status": "fail" to any request to test your error handling:
{
  "network": 1,
  "phone": "2347013397088",
  "data_plan": 19,
  "request-id": "Test_2",
  "sandbox_status": "fail"
}
Response
{
  "status": "fail",
  "message": "[SANDBOX] Simulated failed transaction. No wallet was charged.",
  "request-id": "Test_2",
  "sandbox": true
}

Going live

When you’re ready, switch the base URL to https://api.mysubwallet.ng (and use your live key) — same endpoints, same payloads. Confirm sandbox is no longer in the response and your wallet balance changes as expected.
Keep your keys server-side. Never ship them in client-side code.