# Sandbox and live (/fr/docs/sandbox)

| | Sandbox | Live |
| --- | --- | --- |
| Host | `https://api-sandbox.caibopay.app` | `https://api.caibopay.app` |
| Key | `psp_test_…` | `psp_live_…` |
| Money | Test | Real |
| `livemode` in events | `false` | `true` |
| `environment` in `GET /v1/account` | `sandbox` | `live` |

They are separate deployments: each has its own data, customers, beneficiaries, webhooks, and keys. A key sent to the wrong environment is rejected with `401 invalid_api_key`, just like an invalid key.

## What exists only in sandbox [#what-exists-only-in-sandbox]

- **Simulated deposits.** <Endpoint method="POST" path="/v1/sandbox/deposits" href="/api#tag/sandbox/POST/v1/sandbox/deposits" /> deposits into a funding account at the test bank, the `bank_transfer` USD account. The deposit follows the real path (notification, verification, crediting) and you receive `payin.completed`. This route doesn't exist in live.
- **A test bank** that executes payouts to Mexico (`spei`, MXN), Brazil (`pix`, BRL) and Peru (`bank_transfer` to a CCI, PEN), so you can run them end to end. It checks PIX and CCI beneficiary details the way live does: the PIX key (CPF and CNPJ with their check digits, email, `+55…` phone or random key), the 20-digit CCI and the DNI (8) or RUC (11). See [Beneficiaries](/docs/beneficiaries).

## Test scenarios [#test-scenarios]

The test bank decides what happens to a payout from the cents of its amount or from the account, in any of the three countries:

| If the payout… | This happens | You receive |
| --- | --- | --- |
| has any other amount | It executes at once | `payout.completed` |
| ends in `.13` (for example `100.13`) | The bank refuses it and the balance returns | `payout.failed` |
| ends in `.17` | The bank never answers: it stays in verification with the balance held | status `verification_pending` |
| goes to an account ending in `0000` (CLABE, PIX key or CCI) | The destination bank refuses it and the balance returns | `payout.failed` |

<Callout type="warn" title="Differences you should know">
- In sandbox, PIX and soles pay-ins go to the real bank's test environment and **can't** be paid with `POST /v1/sandbox/deposits`.
- In live, a payout in soles needs the beneficiary to belong to a **customer** with complete sender details (see [Customers](/docs/customers)); the test bank does not require it. Send it from sandbox anyway.
- The test bank ignores fields the method does not use; live refuses them. Send only the fields in `beneficiary_fields`.
</Callout>

## Recommendations [#recommendations]

- Keep the host and the key in your configuration, not in code: going live means changing those two variables.
- Use each event's `livemode` so you never mix test data with real data.
- Before going live, work through the [checklist](/docs/go-live).
