Start
Test mode
A sandbox with its own Jusa Credit and numbers that act out every outcome.
Every organisation has a test-mode twin. A test key (jusa_sk_test_…, or the dashboard switched to
Test) reaches it, and nothing it does reaches Hot Recharge, Pesepay, SMS, email, push or finance. Objects
made in test mode say "livemode": false, and a live id passed with a test key is a
404, as if it did not exist.
Test Jusa Credit
US$1,000 and ZWG 25,000, topped back up every day to at least that. Add more with
POST /test/credit {"currency": "USD", "amount": "500.00"}. A test top-up is credited at once; a test
checkout session has a fake Pesepay page with Pay and Fail buttons, and its payment can only ever pay for a test send.
Magic phone numbers
Any valid number on any network (071, 073, 077, 078): the last four digits choose what happens. Use a plain number
such as 0772555001 for an ordinary send.
| Ends in | What happens |
|---|---|
…0000 | Delivered at once (also any suffix not listed here). |
…0001 | Delivered after 20 seconds: submitted, then delivered. |
…0002 | The network rejects it: failed_credited. |
…0003 | 400 invalid_target before anything is written. |
…0004 | 402 insufficient_credit, whatever the balance. |
…0005 | unknown, then delivered after 2 minutes (the reconcile path). |
…0006 | unknown, then failed and credited back. |
…0007 | retrying three times, then delivered. |
…0008 | retrying until the window closes (3 minutes in test mode), then failed_credited. |
…0009 | Provider float empty: retrying with provider_float_empty, delivered after 2 minutes. |
…0010 | A duplicate-SIM fraud signal: a reward is held for review; a checkout payer is held too. |
…0011 | failed_credited, then send.late_delivered after 2 minutes (Jusa Credit re-debited). |
…0012 | unknown past the (compressed) escalation window: requires_review. |
Magic meters
Any 11-digit meter: the last five digits choose.
| Ends in | What happens |
|---|---|
…00000 | Confirms as "SAMPLE CUSTOMER, Sandbox, Harare" and delivers a 20-digit token (also any meter not listed here). |
…00404 | Meter not found: 400 meter_not_found. |
…00423 | Meter blocked or inactive: 400 meter_blocked. |
…00503 | ZESA down: the send is queued, then released after 60 seconds. |
…00504 | The lookup times out: 503 zesa_unavailable with confirm=strict (the default); with confirm=best_effort the send goes ahead to the meter as typed. |
…00505 | ZESA down past max_hold (3 minutes in test mode): failed_credited with zesa_hold_expired. |
Data bundles
Test mode has a fixed list of bundles per network, each marked "simulated": true. Live data bundles
ship later (P2): until then a live data product says "available": false.
Test helpers
Test keys only; a live key gets 403 test_mode_only.
| Call | Does |
|---|---|
| POST /test/approvals/{approval_id}/approve | Approve (test mode) |
| POST /test/approvals/{approval_id}/reject | Reject (test mode) |
| POST /test/checkout-sessions/{session_id}/pay | Pay a test checkout |
| POST /test/checkout-sessions/{session_id}/review | Play staff on a held test checkout |
| POST /test/credit | Add test Jusa Credit |
| POST /test/events/trigger | Fire a sample event |
| POST /test/reset | Wipe test mode |
| POST /test/reward-links/{link_id}/claim | Claim a link, skipping the code |
| POST /test/sends/{send_id}/advance | Move a test send on |
| POST /test/zesa/availability | Take ZESA down or up (test mode) |
POST /test/sends/{id}/advancewithouttoplays the next scripted step now; with{"to": "delivered" | "failed" | "late_delivered"}it moves the send, and refuses (409 send_transition_invalid) a move a live send could not make.POST /test/zesa/availability {"state": "down"}takes ZESA down for your sandbox only and fires thezesa.availability.*events.POST /test/events/trigger {"type": "send.delivered"}fires a sample event to your endpoints (and tojusa listen). From the CLI:jusa trigger send.delivered.POST /test/resetwipes sends, rewards, batches, programs, checkout sessions, disputes, exports, events and the ledger, and resets the credit. Keys, webhook endpoints, recipients, groups, cost centres and schedules stay.
Signatures
Test-mode deliveries are signed with the test endpoint's own secret, and carry "livemode": false, so a
handler can refuse test events in production.