Get started
Testing
Test keys, and amounts and numbers that fail on purpose.
A sk_test_ key reaches the same API, with the same validation, and moves no
money. Its outcomes are decided by the amount, or for a payout the
destination, that you send.
Key requirements
- A test key, beginning
sk_test_, from Settings → API & developer in the dashboard. - No balance. Test charges and payouts never touch a balance, the test one included, so a test payout needs no funds.
How it works
- You call the API with a test key, exactly as you would with a live one.
- The request is checked as live checks it, and refused where live would refuse it. The exceptions are under Uganda in test mode.
- Instead of a phone or a bank, the sandbox decides the outcome, at once, in the same request.
- Webhooks go to the endpoints you registered with a test key, about five seconds later.
Test and live never touch. A test key sees test charges, payouts and webhook endpoints only, and its idempotency keys are its own: an order reference you used while building cannot collide with a real one later.
Charges
amount_minor | Result | Webhooks |
|---|---|---|
999999 | failed, failure_reason: insufficient_funds | charge.created, charge.failed |
999998 | pending, and it stays there | charge.created |
| anything else | succeeded | charge.created, charge.succeeded |
A charge's payer number is never consulted: only the amount decides.
Payouts
amount_minor | Destination | Result | Webhooks after payout.created |
|---|---|---|---|
999999 | +250788000002 | failed | payout.processing, payout.failed |
999998 | +250788000003 | stays processing: the outcome is unknown | payout.processing, payout.reconciling |
999997 | +250788000004 | failed, then returned | payout.processing, payout.failed, payout.returned |
999996 | +250788000005 | parked_for_review | payout.parked |
| anything else | +250788000001, or any other | completed | payout.processing, payout.completed |
The destinations are Rwandan wallet numbers: send them as
destination.phone_number, exactly as written, with "network": "MTN". The
destination wins where both are magic. A payout to a saved beneficiary has
no destination of its own, so use the amounts. A payout over your approval
threshold waits for approval first, as in live, and resolves once approved.
What each outcome says:
| Outcome | Where to read it |
|---|---|
failed | failure_reason is unknown |
stays processing | payout.reconciling carries reason: upstream_timeout |
parked_for_review | payout.parked carries reason: manual_review_required |
Branch on the status, never on the reason or the message. Live reasons come
from one vocabulary: insufficient_funds, invalid_account,
cancelled_by_payer, timeout, rejected_by_provider,
account_unavailable and unknown.
Uganda in test mode
There are no Ugandan test numbers. Use the amounts.
- A UGX charge resolves by amount, as above. Test mode does not check
whether the number is a Ugandan MTN or Airtel number, whether the amount is
whole shillings between 1,000 and 5,000,000 UGX, or whether UGX is
activated on your business; live does, and leaves such a charge
createdwith nobody prompted. See Accepted, then never sent. - A UGX payout meets every live check first: whole shillings, the amount
bounds, a Ugandan MTN or Airtel number, a
bank_codefrom/payout-banks. A payout that passes completes. The magic amounts are not whole shillings, so they are refused (400 INVALID_PAYOUT): rehearse failures with an RWF test payout. - Account lookups are simulated: a number or account ending in
0000is not valid, anything else is held byTEST ACCOUNT HOLDER. See Account lookups.
Webhooks
Register an endpoint with your test key. It receives test events only, and a live endpoint never receives one. Test events are sent about five seconds after they happen.
Errors
A test key is refused exactly as a live key would be, with three exceptions:
the IP allowlist applies to live keys only, a charge's limits and pauses apply
to live keys only, and GET /wallets refuses every test key with
401 WRONG_KEY_MODE. See Errors.
Developer notes
- Test and live share one host. The key decides the mode; there is no sandbox URL.
- Nothing reconciles against money. Test rows never appear in a balance or a statement.