Test mode: test numbers and OTPs
With an sk_test_ key, no operator is contacted and nobody is debited or credited. You can test the whole flow, from creating the charge to webhooks, including the OTP and status changes.
Turn on test mode
Section titled “Turn on test mode”Send your test key in the X-API-KEY header. The key prefix is enough to select the mode, and every response carries "live_mode": false.
- Generate the test key in Developer › API keys (
/user_dashboard/api_keys/), no account verification needed. - It is never subject to the IP allowlist, so you can test from your laptop or your CI.
- Test objects are invisible to the live key (
404), and vice versa. - In the dashboard, the mode switch shows test or live data. Set up your test webhooks in test mode.
Test numbers, amounts and OTPs
Section titled “Test numbers, amounts and OTPs”The amount must match the number. With the Orange number 76000000, only the amount 1000 XOF succeeds; 1500 on that same number fails. The OTP is always 123456.
What each outcome looks like
Section titled “What each outcome looks like”| You send | Result |
|---|---|
| Correct test number, amount and OTP | POST /charges/submit returns 200, status: true, the charge moves to success, the charge.success webhook fires |
| Wrong OTP, or an amount that doesn’t match the number | 200, status: false, error_code: "OTP_INVALID". The charge stays in send_otp: you can submit again |
Moov with confirmation_method: "ussd" |
The charge is created in pay_offline. About 5 seconds later it moves to success if number and amount match, otherwise to failed |
| Amount out of range or malformed number | 400, error_code: "INVALID_DATA", details in errors |
Creating the charge (POST /v1/payment/charges/) returns 201 and status send_otp even with a number that isn’t in the table, because the combination is only checked when the OTP is submitted. On the hosted payment page, use the same values.
Transfers in test mode
Section titled “Transfers in test mode”Transfers created with an sk_test_ key are simulated and never sent to the operator. The transfer is created as pending (201), then moves to success as soon as it is processed, and the transfer.success webhook fires. The recipient number must follow the same rules as in live mode. In Burkina Faso, it has 8 digits and its second digit must match the operator: 4 to 7 for Orange, 0 to 3 for Moov. Without recipient_wallet, the operator is inferred from that second digit, which must therefore be between 0 and 7. In Benin, the number has 10 digits and starts with 01.
A test transfer needs a sufficient test transfer balance, fees included. Otherwise, the API returns 403 with error_code: "MERCHANT_INSUFFICIENT_FUNDS".
That balance comes from test top-ups. Switch the dashboard to test mode, then open the Top Up menu (/user_dashboard/topups/). Depending on your account settings, the top-up is approved automatically or by the Senfenico team. If it stays pending, email contact@senfenico.com. Check the balance with GET /v1/payment/balances/.
What test mode doesn’t show
Section titled “What test mode doesn’t show”- Real operator delays and messages (USSD, SMS, slow network).
- Operators that aren’t enabled on your live account.
- The IP allowlist, which only applies to the live key.
So make a first small real payment before opening the service to customers (see the go-live checklist).