Test scenarios
The numbers, cards and accounts that force each outcome.
In sandbox the outcome is not random, it is addressed. You pick it by choosing the phone number, the card, the bank account or the wallet you pay with. Everything on this page is read straight from the platform's sandbox table.
Mobile money
A test number is an operator prefix followed by a six digit suffix that names the outcome.
number = operator_prefix + outcome_suffix
+23767 + 000002 = +237670000002
MTN Cameroon failure a payment that always failsThe six suffixes
| Suffix | Outcome | What your integration sees |
|---|---|---|
000000 | Success | payment.succeeded after about 3 seconds |
000001 | Insufficient funds | payment.failed, the payer had no balance |
000002 | Failure | payment.failed, refused by the operator |
000003 | Timeout | payment.failed, the operator never answered |
000004 | Cancelled | payment.cancelled, the payer refused |
000009 | Success, then a refund that fails | payment.succeeded, then refund.failed |
Leading zeros are tolerated
The subscriber part may carry extra leading zeros before the suffix, so +2376700000000 matches
000000 too. Anything else between the prefix and the suffix does not match, and the number is
rejected as not being a test number.
Prefixes
Sixteen countries, forty four operators.
| Country | Operator | Prefix |
|---|---|---|
+23767 | ||
+23769 | ||
+23768 | ||
+23766 | ||
+22505 | ||
+22507 | ||
+22501 | ||
+22503 | ||
| Green | +22509 | |
+2348 | ||
+2347 | ||
+22177 | ||
| Free | +22176 | |
+23324 | ||
| Vodafone | +23320 | |
+23326 | ||
| AirtelTigo | +23327 | |
+25470 | ||
+25471 | ||
+25473 | ||
| Equitel | +25476 | |
| T-Kash | +25477 | |
+25567 | ||
| Tigo | +25565 | |
| Vodafone | +25574 | |
| HaloPesa | +25562 | |
+25677 | ||
+25675 | ||
+25078 | ||
+25073 | ||
+24399 | ||
+24389 | ||
| Vodacom | +24381 | |
+24382 | ||
+22990 | ||
+22991 | ||
| Glo | +22997 | |
+22670 | ||
+22671 | ||
+2410 | ||
+2411 | ||
+24205 | ||
+23566 | ||
+23670 |
Worked examples
| Scenario | MTN Cameroon | Orange Ivory Coast | M-Pesa Kenya |
|---|---|---|---|
| Success | +237670000000 | +225070000000 | +254700000000 |
| Insufficient funds | +237670000001 | +225070000001 | +254700000001 |
| Failure | +237670000002 | +225070000002 | +254700000002 |
| Timeout | +237670000003 | +225070000003 | +254700000003 |
| Cancelled | +237670000004 | +225070000004 | +254700000004 |
Cards
Any future expiry date and any CVV. Neither is validated: the card number alone decides the outcome.
Succeeds without 3D Secure
| Card | Network | Outcome |
|---|---|---|
4242 4242 4242 4242 | Visa | Succeeds |
5555 5555 5555 4444 | Mastercard | Succeeds |
4000 0000 0000 5423 | Visa | Succeeds, and every refund on it fails |
Requires 3D Secure
Hosted checkout shows a simulated challenge. These return 202 first, and the final status
arrives once the challenge is resolved.
| Card | Outcome of the challenge |
|---|---|
4000 0566 5566 5556 | Passes, payment succeeds |
4000 0025 0000 3155 | Passes, payment succeeds |
4000 0027 6000 3184 | Passes, payment succeeds |
4000 0025 0000 3063 | Authentication fails |
4000 0025 0000 3089 | Authentication fails |
4000 0025 0000 3018 | Authenticates, then the issuer declines |
4000 0025 0000 3026 | Authenticates, then the issuer declines |
4000 0025 0000 3034 | The payer abandons the challenge |
4000 0025 0000 3042 | The payer abandons the challenge |
4000 0025 0000 3050 | The challenge times out |
4000 0025 0000 3097 | The challenge times out |
Fails without 3D Secure
| Card | Outcome |
|---|---|
4000 0000 0000 9995 | Insufficient funds |
4000 0000 0000 0002 | Declined |
4000 0000 0000 9987 | Declined |
4000 0000 0000 9979 | Declined |
4000 0000 0000 0069 | Declined |
4000 0000 0000 0127 | Declined |
4000 0000 0000 0119 | Declined |
4000 0000 0000 0341 | Declined |
4000 0000 0000 6975 | Declined |
4242 4242 4242 4241 | Declined |
One decline, not ten reasons
Only …9995 carries a distinct reason. The other nine produce the same generic decline, so use
whichever you like when testing a failure path. A card that is not on this page is refused for
not being a test card.
Bank accounts
Any account number or IBAN of at least four characters is accepted. The last two digits choose the outcome.
| Ends with | Outcome |
|---|---|
00 | Success |
01 | Insufficient funds |
02 | Failure |
03 | Timeout |
04 | Cancelled |
Anything else succeeds, so an account ending in 47 simply works.
Crypto
The crypto channel is off in sandbox unless it has been enabled for your account. When it is on, the wallet address suffix chooses the outcome.
| Address ends with | Outcome |
|---|---|
_success | Succeeds |
_insufficient | Insufficient funds |
_failure | Fails |
_timeout | Times out |
_canceled | Cancelled |
The deposit address the API returns is derived deterministically from the payment, the channel and the scenario, so the same test twice gives the same address. It expires after 30 minutes.
Refunds
A refund's outcome comes from the original payment, not from the refund call.
| The payment was made with | The refund |
|---|---|
4000 0000 0000 5423 | Always fails |
A number ending 000009 | Always fails |
A number ending 000001, 000002, 000003 or 000004 | Fails |
A number ending 000000 | Succeeds |
| Any other card, a bank account, a crypto wallet | Succeeds |
Transfers
A payout uses the beneficiary's details, and the same suffixes apply. A mobile money beneficiary must carry a recognised test number.
A transfer debits your sandbox balance, so run a successful payment first, or the payout fails for lack of funds exactly as it would in live.