Test mode
Every merchant gets two kinds of secret key. The key alone decides the mode — there is no flag to pass.
sk_test_… |
sk_live_… |
|
|---|---|---|
| Providers | a mock connector — never calls Wave or Orange Money | Wave, Orange Money |
| Money | none; balances live in separate test: ledger accounts |
real XOF |
| Merchant status | works while your account is pending_review |
needs active (else 403 merchant_not_active) |
livemode on objects |
false |
true |
Test and live data never mix: a test payment is 404 for your live key and the other way round, and test money
can’t be paid out to a real wallet.
Simulating outcomes
Section titled “Simulating outcomes”| To get | Do |
|---|---|
| a successful payment | POST /v1/payments/{id}/simulate {"outcome":"succeeded"} — or click Approuver on the test wallet page |
| a failed payment | same with "failed" — or Refuser |
| an expired payment | leave it unpaid; checkouts expire after 30 minutes and are closed by a background job within ~5 minutes after that |
| a successful payout | any recipient phone, e.g. +221770000001 |
| a failed payout | a recipient phone ending in 0000, e.g. +221770000000 — the reserved amount and fee are returned to available |
insufficient_funds |
a payout larger than available |
simulate goes through the same path as a real provider notification (inbox → state machine → ledger → webhook), so
what you see in test mode is what live mode does. It returns 403 with a live key.