Test Phone Numbers for SMS OTP in the Didit Sandbox
In a Didit sandbox application the phone provider is mocked, so no SMS is sent and nothing is billed; sandbox testing is free and unlimited.

Contents
In this guide
Jump to the part you need.
Testing SMS OTP without texting real people is a sandbox problem. This guide is for developers who need a working phone verification flow with no carrier traffic and no spend. In the Didit sandbox the phone provider is mocked, so no SMS leaves and nothing is billed. Live codes cost the carrier price for the country plus our $0.02 fee. The caveat: sandbox OTP values come from GET /v1/sandbox/scenarios/, while reserved test numbers are documented in the Phone Verification reference, so read both rather than hardcoding values.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| What | Sandbox application | Live application |
|---|---|---|
| API key prefix | sk_test_ | sk_live_ |
| SMS delivery | Provider mocked, no message sent | Real code over SMS, WhatsApp, Telegram, voice or Viber |
| Cost per code | $0.00, never billed | Carrier price for the country and channel plus the $0.02 Didit fee |
| Where the code comes from | The sandbox catalog, GET /v1/sandbox/scenarios/ | The user's phone |
| Code window | Set by the scenario you run | 5 minutes from the first send, a same-window retry keeps the deadline |
| Wrong code limit | Set by the scenario you run | verification.max_attempts, 5 by default |
| Quota | Sandbox testing is free and unlimited. | Plan credit, then top-ups |
| Webhooks | "environment": "sandbox" | "environment": "live" |
Start free in the sandbox at business.didit.me, no sales call. Developers who want an AI assistant to wire the calls can connect Didit through the MCP server. The phone documentation lives at Phone Verification and the per code pricing at phone pricing, with the full price list on pricing.
The outcome, and the method we recommend
You want four things from a test run: a code that verifiably passes, a code that verifiably fails, the risk signals on the number, and the record of all of it in the console. You should get those without a single carrier call.
We recommend the sandbox application as your default test target, with the standalone phone pair for logic tests and the risk endpoint for number quality tests. These four routes each test a different part of the flow:

- Sandbox session workflow. Put the
PHONEfeature in a workflow, create a session, and walk the hosted flow. Every external provider including phone is mocked, so the user experience is real but no message is sent. - Sandbox standalone pair. Call
POST /v3/phone/send/thenPOST /v3/phone/check/with ask_test_key. This is the closest test to the server side of your production integration. - Risk scoring without an OTP.
POST /v3/phone/risk/returns carrier, line type, porting and fraud risk for a number without sending anything, in sandbox or live. - Reserved test numbers. Network registrations have their own test number endpoints, so you can exercise an approval flow without waiting on a carrier.
Reserved numbers and the way account and number state change a result are documented on the Phone Verification API reference, in the section on number checks, test numbers and account behaviour. Read that page next to the sandbox catalog, because the catalog is generated from the verification service and is the source of truth when a doc looks stale.
Prerequisites
- A Didit organization. A Free plan organization created with a work email gets $10 of monthly credit, and sandbox testing is free and unlimited. Free plan credit does not cover phone codes, so plan a top-up or a Growth plan before you test live.
- A sandbox application. Its key starts with
sk_test_and it runs in modeSANDBOX. Keys created before the prefix format have no prefix and still work, so never validate a key by its prefix. - The key kept server side. Send it as the
x-api-keyheader onhttps://verification.didit.me. Never ship it to a browser or a mobile bundle. - Phone numbers in E.164 format, for example
+14155552671. Anything else returns HTTP 400 on the send call. curland, optionally,jqfor reading responses.
Step by step: test SMS OTP without sending a real SMS
The flow you are testing: collect the number, send a code, check the code and read back carrier and risk signals.
Pick the sandbox application. In the Business Console, select the application whose mode is sandbox and open Developers, then API keys. Every product is on in a sandbox application, so the phone endpoints are already reachable. Copy the primary key into an environment variable:
export DIDIT_API_KEY=sk_test_....Read the reserved values before you write a test. The sandbox catalog is served live and authenticated with the same key. It carries the scenario names, the magic values and the sandbox OTP codes that make an outcome deterministic.
curl -s 'https://verification.didit.me/v1/sandbox/scenarios/' -H "x-api-key: $DIDIT_API_KEY"Keep the values it returns inside your test fixtures. Do not paste them into application code, and do not assume the set never changes: the endpoint, not this page, is the source of truth.
Send a code. This is the documented send call. On a sandbox key the provider is mocked, so nothing reaches a network, and a sandbox send is never repriced as a voice code even when the number is a fixed line.
curl -X POST 'https://verification.didit.me/v3/phone/send/' -H "x-api-key: $DIDIT_API_KEY" -H "Content-Type: application/json" -d '{ "phone_number": "+14155552671", "options": { "code_size": 6, "preferred_channel": "sms", "locale": "en-US" }, "vendor_data": "user-1234" }'Check the code. Send the code the catalog gave you for that scenario, plus the
verification_idthat the send call returned, so the check targets that specific verification.curl -X POST 'https://verification.didit.me/v3/phone/check/' -H "x-api-key: $DIDIT_API_KEY" -H "Content-Type: application/json" -d '{ "phone_number": "+14155552671", "verification_id": "<verification-id>", "code": "<sandbox-code>", "voip_number_action": "DECLINE" }'Score a number without an OTP. When you only care about number quality, skip the send.
POST /v3/phone/risk/returns carrier, line type, porting and fraud risk for one number. This call is not a verification and is not listed with verifications. It is billed as its own price-book line, separate from verification codes.Test a network registration approval. Network registrations are approved per number, so Didit exposes test number endpoints: add a test number, list registrations, track approval, then remove the test number. Use them to walk the approval states without a carrier in the loop.
Read the records back. Verification records list newest first and you can filter by status, channel, phone number, reference, tag or creation time.
nextandpreviousare offsets, not URLs, so passnextasoffset. Addformat=csvto export.curl -s 'https://verification.didit.me/v3/phone/verifications/?status=verified&limit=20' -H "x-api-key: $DIDIT_API_KEY"Rehearse the failures, then go live once. Run the wrong-code, expired-window and blocked-send cases in the sandbox until your UI handles each one. Then repeat the same pair of calls on the live key with one real number you own, to confirm delivery and the carrier price you will pay.
Expected output
The check step is what returns status plus the carrier, virtual number and disposable number signals. In a sandbox application the carrier leg is mocked, so the shape of the response is the same and nothing is delivered.
The status field is the one you branch on. The risk fields come back with the check response, so the same call answers both questions.

status plus carrier type, virtual number and disposable number signals. In sandbox the shape is the same and nothing is delivered.| Field | Values you will see | What it means for your test |
|---|---|---|
status | Not Started, In Progress, Approved, Declined, Failed, Expired or Not Found, Abandoned, Kyc Expired | Approved is the pass case. Failed means wrong code with attempts left. |
carrier.type | mobile, landline, voip | Use it to route the channel, for example voice for a fixed line. |
is_disposable | true or false | Throwaway number detection. Pair it with disposable_number_action. |
is_virtual | true or false | VoIP or virtual number. Pair it with voip_number_action. |
line_type, ported | Carrier line type and porting state | Useful when a number changed networks and delivery behaves oddly. |
warnings[] | DUPLICATED_PHONE_NUMBER, DISPOSABLE_NUMBER, VOIP_NUMBER, INVALID_PHONE_NUMBER, OTP_DELIVERY_FAILED, OTP_MAX_ATTEMPTS_REACHED, OTP_EXPIRED, PHONE_NUMBER_BLOCKED | Each warning is a branch in your UI or your risk rules. |
Failure cases and how to recover
- HTTP 400 on send. The number is not E.164. Normalise it to a leading plus and country code before you retry.
status="Blocked"with reasonspam. The abuse protection refused the send. No code was sent and nothing was charged. Do not retry in a tight loop, and do not treat it as a delivery failure.status="Failed". Wrong code with attempts remaining. Re-prompt the user and show the remaining attempts. The default limit is 5 wrong entries per standalone verification.status="Declined". The verification ended. If theOTP_MAX_ATTEMPTS_REACHEDwarning is present, the user exhausted the configured limit. Start a new verification rather than reusing the record.status="Expired or Not Found". You are outside the 5-minute window, or there is no pending verification for that number. Restart the send. A same-window retry keeps the original deadline.- HTTP 401 or 403. A wrong or missing key returns 401 and 403 respectively. A scoped key without access to the resource also returns 403. Re-issue or re-scope the key in the console.
- HTTP 429. Rate limited. The response carries a
waitfield in seconds. Back off by that amount.
Inputs and outputs
| Direction | Field | Notes |
|---|---|---|
| In | phone_number | E.164. Required on send and on check. |
| In | options.code_size | Code length. Six is the documented example. |
| In | options.preferred_channel | sms, whatsapp, telegram, voice, viber. Falls back to SMS when the channel is unavailable. |
| In | options.locale, options.sms_sender_name | Message locale, and a sender name of 1 to 30 characters for one code. |
| In | vendor_data | Your own reference, echoed on the record. |
| In | verification_id | From the send response, so the check targets that verification. |
| In | code, voip_number_action | The typed code, and what to do when the number is VoIP, for example DECLINE. |
| Out | status | The decision for the verification. |
| Out | carrier, line_type, is_disposable, is_virtual, ported | The number quality signals. |
| Out | warnings[] | The risk catalogue for the phone feature. |
| Out | verification_id | Use it for the check, the record lookup and support. |
What is billed, and where review starts
- Sandbox: Sandbox testing is free and unlimited. A sandbox application is never billed and the balance check is bypassed.
- Live codes: the carrier price for the country and channel plus our $0.02 fee. On Growth the fee is $0.0192 and on Scale $0.018. Carrier charges pass through at cost; only our fee takes the plan discount. You pay when a check finishes with a result, so a blocked send is free.
- Risk lookups: risk lookups are their own price-book line, separate from verification codes. Lookups skip the first-top-up requirement but still need credit to cover them.
- Free plan boundary: phone codes are excluded from Free plan credit. Sending codes requires a paid Growth or Scale plan or the organization's first top-up.
- Review boundary: there is no manual review inside OTP verification. The review step in this flow is the network registration approval, which is tracked per number through the registration status endpoint, and the sandbox test number endpoints let you walk that approval without a carrier.
Worked cost example
Take 500 US phone verifications in one month, all by SMS, at list price. Prices are per country and channel, and carrier charges pass through at cost. One US SMS code is $0.0473 total: the carrier price plus the $0.02 fee. 500 x $0.0473 = $23.65. Run the same 500 in the sandbox and the arithmetic is 500 x $0.00 = $0.00, which is the reason test traffic belongs there.
Mix the channels and the number moves. 300 by SMS and 200 by WhatsApp: 300 x $0.0473 = $14.19, 200 x $0.0431 = $8.62, total $22.81. Telegram is $0.05 per code in every country in the feed, so 500 Telegram codes would be 500 x $0.05 = $25.00.
On a discount plan only our fee shrinks. The US carrier part is $0.0473 minus $0.02 = $0.0273. On Growth that gives $0.0273 + $0.0192 = $0.0465 per code, so 500 x $0.0465 = $23.25. On Scale it is $0.0273 + $0.018 = $0.0453, so 500 x $0.0453 = $22.65. All of it is $0 in a sandbox application.
Sources
- Phone Verification API: SMS OTP and risk signals, including the section on number checks, test numbers and account behaviour.
- Phone Verification overview and integration prompt.
- List phone verifications API.
- Sandbox test data: scenarios, magic values and documents.
- Didit pricing in the docs and API authentication.
- Didit pricing page, phone price list and pricing as JSON, read November 26, 2026.
- Didit Business Console and Didit MCP server.
Open a sandbox application at business.didit.me, copy the sk_test_ key, and run the send and check pair against your own test fixture before you spend anything on live codes. No sales call.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
How do I test SMS OTP without sending a real text?
Create a sandbox application in the Didit Business Console and use its sk_test_ key on POST /v3/phone/send/ and POST /v3/phone/check/. In sandbox every external provider, phone included, is mocked, so no SMS is sent to anyone and no third party is called. You read the sandbox code from GET /v1/sandbox/scenarios/ and check it like a real one.
Do sandbox phone verifications cost anything?
No. Sandbox testing is free and unlimited, and sandbox sessions are never billed. Live codes cost the carrier price for the country plus the $0.02 Didit fee.
What test phone numbers does Didit provide?
Reserved test numbers, and how account and number state change a result, are documented in the Phone Verification API reference, and sandbox OTP values come from GET /v1/sandbox/scenarios/. Network registrations have their own test number endpoints to add a test number, list registrations, track approval and remove it, so you can walk the approval states without a carrier. Read both live sources instead of copying a number from a blog post.
How long is an OTP valid and how many attempts do I get?
A live code is valid for 5 minutes from the first send, and a retry inside that window keeps the same deadline. The wrong code limit is the verification.max_attempts setting, 5 by default for a standalone verification. In sandbox both values follow the scenario you run.
Can I test phone verification without sending any code at all?
Yes. POST /v3/phone/risk/ scores carrier, line type, porting and fraud risk for a number without an OTP. Use it when you only need number quality, for example to block disposable numbers at signup. It is billed as its own price-book line, separate from verification codes, and in sandbox it is mocked like everything else.
Why does my check call return Expired or Not Found?
Either you are past the code window, or there is no pending verification for that number. Restart with a new send and pass the new verification_id to the check. If you are testing in a loop, confirm you are reusing the same number and the newest verification, not an older one.
What does a Declined status mean on a phone verification?
Declined means the verification ended, not that the code was merely wrong. If the OTP_MAX_ATTEMPTS_REACHED warning is present, the user used up the configured attempts. Start a fresh verification instead of retrying the declined record.
Can I use my own phone number in the sandbox?
In a sandbox application the phone provider is mocked, so a number in E.164 format can be used to rehearse the UI and nothing is delivered. The scenario supplies the expected sandbox code, and the digits you type do not decide the outcome: an incorrect code still exercises the failure path. Read the catalog for the reserved values, and use a number you control on a live key, where the code is a real message and the carrier price applies.
How do I test WhatsApp, Telegram or voice instead of SMS?
Set options.preferred_channel to whatsapp, telegram, voice or viber on the send call. Delivery falls back to SMS when the preferred channel is unavailable, and an eligible new SMS send to a fixed line may be read out in a call instead and priced as a voice code. That fallback never applies to a sandbox send.
Where do I see phone verification records and risk lookups?
Verifications are listed at GET /v3/phone/verifications/, filterable by status, channel, number, reference, tag and creation time, with a CSV export. Risk lookups are not verifications and are read separately at GET /v3/phone/lookups/. Each verification record includes every attempt.
Is a Didit sandbox application enough to go live later?
The calls and fields are the same, so a working sandbox integration is most of the work. What changes is the key prefix, real delivery, and billing: live codes need plan credit or a top-up, and phone codes are excluded from Free plan credit. Repeat the send and check pair once on the live key with a number you own before you release.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


