Sandbox and testing
Test everything — including failures — without sending a real SMS or spending money.
How sandbox works
- Use a sandbox key (
nxk_test_…). It works on any project, even one in production. - Messages go through the same validation, queues, statuses and webhooks as production, but a simulator delivers them instead of a network.
- Nothing is charged:
chargeisnulland your wallet isn’t touched. Responses sayenvironment: "sandbox"andsimulated: true. - Any valid sender ID works. Production requires an approved one.
- OTP responses include
testCodeso you can complete verification in tests. It never appears for production keys. - Sandbox projects can send up to 200 SMS and 100 OTP codes per day.
Test numbers
These numbers always produce the same result, so you can test every path in your integration.
| Number | Outcome |
|---|---|
0200000009 | Delivered. OTP codes are always 123456 (trimmed or padded to your code length). |
0200000001 | Rejected by the provider → `not_sent` (error `invalid_recipient`). |
0200000002 | Provider times out and never received it → `not_sent` after checks. |
0200000003 | Accepted, then delivery fails → `undelivered`. |
0200000004 | Accepted, then expires → `expired`. |
0200000005 | Accepted, then the network rejects it → `rejected`. |
0200000006 | Accepted, no delivery report → stays `submitted`. |
0200000007 | Provider busy twice, then delivered (shows retries). |
0200000008 | Provider times out but did receive it → found by reconciliation, then delivered. |
Any other valid Ghana number | Delivered after a couple of seconds. |
Testing OTP in CI
Send to 0200000009 and verify with 123456 (the first digits, if your code length is shorter). Codes for every other number are random — read testCode from the response.
The dashboard playground
More → Developers → Playground runs any endpoint against your project in sandbox, without a key, and shows the equivalent code in five languages.
Simulated production (test mode)
While Nopexo’s live sending is in test mode, production keys are also delivered by the simulator but are priced and charged to your wallet with test funds, so billing can be checked end to end. Responses show simulated: true.