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 inWhat happens
…0000Delivered at once (also any suffix not listed here).
…0001Delivered after 20 seconds: submitted, then delivered.
…0002The network rejects it: failed_credited.
…0003400 invalid_target before anything is written.
…0004402 insufficient_credit, whatever the balance.
…0005unknown, then delivered after 2 minutes (the reconcile path).
…0006unknown, then failed and credited back.
…0007retrying three times, then delivered.
…0008retrying until the window closes (3 minutes in test mode), then failed_credited.
…0009Provider float empty: retrying with provider_float_empty, delivered after 2 minutes.
…0010A duplicate-SIM fraud signal: a reward is held for review; a checkout payer is held too.
…0011failed_credited, then send.late_delivered after 2 minutes (Jusa Credit re-debited).
…0012unknown past the (compressed) escalation window: requires_review.

Magic meters

Any 11-digit meter: the last five digits choose.

Ends inWhat happens
…00000Confirms as "SAMPLE CUSTOMER, Sandbox, Harare" and delivers a 20-digit token (also any meter not listed here).
…00404Meter not found: 400 meter_not_found.
…00423Meter blocked or inactive: 400 meter_blocked.
…00503ZESA down: the send is queued, then released after 60 seconds.
…00504The lookup times out: 503 zesa_unavailable with confirm=strict (the default); with confirm=best_effort the send goes ahead to the meter as typed.
…00505ZESA 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.

CallDoes
POST /test/approvals/{approval_id}/approveApprove (test mode)
POST /test/approvals/{approval_id}/rejectReject (test mode)
POST /test/checkout-sessions/{session_id}/payPay a test checkout
POST /test/checkout-sessions/{session_id}/reviewPlay staff on a held test checkout
POST /test/creditAdd test Jusa Credit
POST /test/events/triggerFire a sample event
POST /test/resetWipe test mode
POST /test/reward-links/{link_id}/claimClaim a link, skipping the code
POST /test/sends/{send_id}/advanceMove a test send on
POST /test/zesa/availabilityTake ZESA down or up (test mode)
  • POST /test/sends/{id}/advance without to plays 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 the zesa.availability.* events.
  • POST /test/events/trigger {"type": "send.delivered"} fires a sample event to your endpoints (and to jusa listen). From the CLI: jusa trigger send.delivered.
  • POST /test/reset wipes 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.