> For the complete documentation index, see [llms.txt](https://docs.idlayr.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.idlayr.com/products/number-verification/secure-sna/testing.md).

# Testing in sandbox

{% hint style="info" %}
**Device API** · NV 1.0 · GA
{% endhint %}

Test Secure SNA without real carrier traffic by using a sandbox project. The last digits of the `phone_number` you submit drive the simulated outcome — you don't need a real device or carrier coverage to exercise the full flow.

See [Project modes](/get-started/concepts/project-modes.md) for the general sandbox model.

## How sandbox testing works

In sandbox mode, IDlayr intercepts the request and returns a simulated result based on the MSISDN suffix. The shape of the response is the same as production — same fields, same error codes, same callback delivery — so your integration code doesn't need to branch on environment.

The verification URL the SDK drives is also synthetic in sandbox; the redirect chain completes locally without contacting a carrier.

## MSISDN suffix map

| MSISDN ends with                     | `match` | `status`    |
| ------------------------------------ | ------- | ----------- |
| Even digit (`0`, `2`, `4`, `6`, `8`) | `true`  | `COMPLETED` |
| Odd digit (`1`, `3`, `5`, `7`, `9`)  | `false` | `COMPLETED` |
| `00`, `55`, `99`                     | —       | `ERROR`     |

For the cross-product overview of sandbox — what's simulated, what isn't, sandbox retention — see [Sandbox testing](/get-started/sandbox-testing.md).

## iOS — Wi-Fi sandbox mode

In production, the iOS SDK requires a cellular data connection. For sandbox projects, the SDK can be configured to allow requests over Wi-Fi instead — useful for simulators and devices without a SIM.

Enable it on the SDK instance:

```swift
let sdk = IDlayrSDK(isSandbox: true)
```

{% hint style="warning" %}
`isSandbox: true` is for sandbox projects only. Production apps must use the default (`false`). A production project will reject the request if the SDK is configured with `isSandbox: true`.
{% endhint %}

## Android — emulator sandbox mode

The Android SDK supports sandbox testing on emulators. When the SDK detects an emulator environment, it automatically:

* Skips cellular network binding (emulators have no cellular radio).
* Falls back to the emulator's default network (Wi-Fi).
* Sends the `x-idlayr-mode: sandbox` header on outbound HTTP requests.

This works only on emulators, not on physical devices. Physical-device sandbox support is on the roadmap.

## What sandbox doesn't simulate

* Real device-to-carrier signal paths or carrier-specific behaviour.
* Production latency variance.
* Carrier-specific edge cases that production traffic surfaces (line type, MVNO, prepaid behaviour).

For final coverage validation, run a small set of production checks against real numbers in your target markets before going live.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.idlayr.com/products/number-verification/secure-sna/testing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
