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: charge is null and your wallet isn’t touched. Responses say environment: "sandbox" and simulated: true.
  • Any valid sender ID works. Production requires an approved one.
  • OTP responses include testCode so 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.

NumberOutcome
0200000009Delivered. OTP codes are always 123456 (trimmed or padded to your code length).
0200000001Rejected by the provider → `not_sent` (error `invalid_recipient`).
0200000002Provider times out and never received it → `not_sent` after checks.
0200000003Accepted, then delivery fails → `undelivered`.
0200000004Accepted, then expires → `expired`.
0200000005Accepted, then the network rejects it → `rejected`.
0200000006Accepted, no delivery report → stays `submitted`.
0200000007Provider busy twice, then delivered (shows retries).
0200000008Provider times out but did receive it → found by reconciliation, then delivered.
Any other valid Ghana numberDelivered 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.