Use these values with a wr_test_ key against https://api.webrabbitmedia.com. Test-mode requests are completely isolated from live-mode data — separate keys, separate transactions, separate balances and webhooks.
Deterministic trigger amounts
The amount decides the outcome, so your tests are repeatable. Any other amount up to the cap approves.
| Field | Type | Description |
|---|---|---|
1.00 | approved | Accepted as pending, then approved on the very next status check. |
2.00 | declined | Fails with a customer-declined reason. |
3.00 | pending → approved | Stays pending for about 15 seconds, then approves. |
4.00 | pending → failed | Stays pending for about 15 seconds, then fails. |
5.00 | insufficient_funds | Fails with an insufficient-funds reason. |
6.00 | approved → reversed | Approves, then reverses about 60 seconds later so you can test reversal webhooks. |
Above 10.00 | 422 test_amount_above_limit | Rejected before anything is created. Use live mode for larger amounts. |
pending, and the outcome arrives on the status check and the webhook. For the terminal triggers (1, 2, 5) the outcome is already final on the first poll.Test wallets
Accepted phone formats: local 0240000000 or international 233240000000. Networks: MTN, TELECEL, AT, GMONEY.
| Field | Type | Description |
|---|---|---|
Any valid wallet | MTN / TELECEL / AT / GMONEY | Resolves to a stable simulated account name. No prompt is sent to the handset. |
Numbers ending 0000 | 422 account_not_found | Simulated lookup failure, so you can test the rejection path. |
Any account number | BANK | Bank name verification is simulated too, with the same 0000 failure rule. |
Knowing which rail you are on
GET /v1/me discloses the routed provider and the exact test-mode behaviour, so integrations can guard themselves. The same values are returned on every API call as the x-wr-upstream and x-wr-test-mode response headers.
{
"mode": "test",
"upstream": "simulator",
"test_mode": "simulated",
"test_moves_real_money": false,
"test_max_amount": 10
}test_moves_real_money is false for every account by default. It only becomes true if you explicitly ask Web Rabbit support to point your test mode at live rails (rare, for provider-side certification); the GHS 10 cap still applies. Always read this field before running automated collection tests.
Hosted Checkout in test mode
POST /v1/checkout/session returns a real branded /pay/<token> checkout URL that expires after 15 minutes. In test mode both Mobile Money and card are simulated — the card option settles on our page instead of redirecting to the provider's hosted form, and follows the same trigger amounts. Confirm the outcome with GET /v1/transactions/{id}.
Example test charge
curl -X POST https://api.webrabbitmedia.com/v1/collect/momo \
-H "Authorization: Bearer wr_test_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: test-$(date +%s)" \
-d '{
"amount": 1.00,
"subscriber_number": "0240000000",
"network": "MTN",
"desc": "Smoke test"
}'