> ## Documentation Index
> Fetch the complete documentation index at: https://docs.i-pay.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox and testing

> Test values, minimum amount and cases to cover before going live.

The Sandbox environment uses the same operations as Live, with a Sandbox key and
`Ipay-Target-Environment: sandbox`; no real transaction is triggered. The requests themselves
are not repeated here: use the [Create a transaction](https://docs.i-pay.money/en/api-reference/transactions/create-a-payment.md)
and [Retrieve a transaction](https://docs.i-pay.money/en/api-reference/transactions/retrieve-a-payment.md) pages, and only replace
the values with the ones below.

## Mobile test numbers

For `Ipay-Payment-Type: mobile` in Sandbox, with `country: NE` (the documentation example), only the ten numbers below are accepted, and
each one simulates a fixed result. Any other `msisdn` for this type returns
`400 Bad Request: Incorrect MSISDN`, even if it is well formed: this is not a generic simulator
that accepts any number.

| MSISDN | Simulated result | Final status returned by the API |
| - | - | - |
| `40410000000` | Success | `succeeded` |
| `40410000001` | Success | `succeeded` |
| `40410000002` | Error | `failed` |
| `40410000003` | Error | `failed` |
| `40410000004` | Insufficient funds | `failed` |
| `40410000005` | Insufficient funds | `failed` |
| `40410000006` | Declined | `failed` |
| `40410000007` | Declined | `failed` |
| `40410000008` | Pending, then resolved automatically | `pending`, then `succeeded` after \~90 seconds |
| `40410000009` | Pending, then resolved automatically | `pending`, then `succeeded` after \~90 seconds |

"Error", "Insufficient funds" and "Declined" share the same final status `failed`: the API
does not expose any additional sub-category in the `status` field to tell these three cases apart.
The two pending numbers do not stay `pending` forever: they automatically move to `succeeded`
after a delayed resolution of about 90 seconds — this is neither a stuck state to fix manually
nor a random result.

## Minimum amount in Sandbox

For `mobile`, the minimum accepted **in Sandbox** is `50` XOF, whereas the Live minimum for the same
type is `25` XOF. An amount between `25` and `49` XOF is therefore refused in Sandbox even though
it would be accepted in Live: do not infer production behavior from it, and test your
error handling with an amount clearly below both thresholds.

## Cases to cover before going live

| Case | Values to use | Expected result |
| - | - | - |
| Successful transaction | `msisdn` `40410000000`, amount ≥ `50` XOF, new `transaction_id` — [request](https://docs.i-pay.money/en/api-reference/transactions/create-a-payment.md) | `200`, then `succeeded` on [status lookup](https://docs.i-pay.money/en/api-reference/transactions/retrieve-a-payment.md) |
| Validation error | same body, amount below the minimum (e.g. `10` XOF) — [request](https://docs.i-pay.money/en/api-reference/transactions/create-a-payment.md) | `400 Bad Request: Amount Not Valid`, no transaction created |
| Duplicate reference | same body as the first case, reusing the `transaction_id` already sent — [request](https://docs.i-pay.money/en/api-reference/transactions/create-a-payment.md) | Refused, no second transaction created. **The shape of the response in Sandbox is not guaranteed to match the Live `422 External Reference Not Valid`** (to be confirmed with support): do not use it as a test assertion — see [Create a transaction](https://docs.i-pay.money/en/api-reference/transactions/create-a-payment.md) |
| Unknown reference | a reference never created on your account — [request](https://docs.i-pay.money/en/api-reference/transactions/retrieve-a-payment.md) | `404 Payment Not Found` |

Treat the validation error as a customer input error, not as an incident to retry
automatically. The full list of codes and messages is in
[Errors](https://docs.i-pay.money/en/api-reference/errors.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.