> ## Documentation Index
> Fetch the complete documentation index at: https://developer.kalixo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox

> Test your integration safely before going live.

Use the **sandbox** environment to build and test your integration before switching to
production keys.

## Environments

|                | Sandbox                        | Production                 |
| -------------- | ------------------------------ | -------------------------- |
| Base URL       | `https://sandbox.kalixo.io/v2` | `https://api.kalixo.io/v2` |
| API key prefix | `kal_test_…`                   | `kal_live_…`               |

See [Authentication](/authentication) for how to send your key.

## How it works

1. **Catalog** - Your assigned products are listed **plus** Kalixo Test products
   (brand **Kalixo Test**, field `isSandboxProduct: true`). Test products are
   included automatically - you do not need to request them separately.
2. **Orders** - Same `POST /v2/orders` and `GET /v2/orders/{reference}` flow as
   production, including price validation, wallet balances on responses, and
   balance debits when wallet ordering is enabled for your account.
3. **Codes** - Orders return test redemption codes prefixed with `SANDBOX-`. No
   real inventory is purchased and no live provider fulfilment occurs.

## Kalixo Test products

Call **`GET /v2/sandbox/scenarios`** with your sandbox API key for the current
list of test `productCode`s, sample order lines, and expected outcomes. Each
scenario includes a `sampleOrderLine` (with `productCode`, `quantity`, and
`price`) that you can send to `POST /v2/orders` as-is.

| Product         | Expected outcome                     |
| --------------- | ------------------------------------ |
| Success (Fixed) | `completed` + codes                  |
| Success (Open)  | `completed` - send line `price`      |
| Async failure   | `failed`                             |
| Partial         | `partially_completed` when qty ≥ 2   |
| Slow            | `processing` \~10s, then `completed` |

**Mixed partial:** order the success and failure products in one request →
`partially_completed`.

**Your catalog products:** any product returned by `GET /v2/catalog/products` can
also be ordered in sandbox; codes are still test-only.

## Wallet

If wallet ordering is enabled for your account, sandbox orders **debit your test
wallet** the same way production would. Top up your sandbox balance through your
account manager if you need to test low-balance behaviour.

## Getting started

1. Obtain a **sandbox API key** (`kal_test_…`) from your account manager.
2. Point all requests at `https://sandbox.kalixo.io/v2`.
3. Call `GET /v2/sandbox/scenarios` to list test products.
4. Follow the [Quickstart](/quickstart) - place an order, poll until
   `completed`, and read the `SANDBOX-*` codes from the response.
5. When you are ready to go live, switch to `https://api.kalixo.io/v2` and your
   production key (`kal_live_…`). Catalog `productCode`s are identical in sandbox
   and production, so the codes you integrated against keep working unchanged.
