Sandbox and live
Two separate environments with the same API. Test everything in sandbox; to go live you change only the key and the host.
| 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
- Simulated deposits. POST/v1/sandbox/deposits deposits into a funding account at the test bank, the
bank_transferUSD account. The deposit follows the real path (notification, verification, crediting) and you receivepayin.completed. This route doesn't exist in live. - A test bank that executes payouts to Mexico (
spei, MXN), Brazil (pix, BRL) and Peru (bank_transferto 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.
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 |
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); 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.
Recommendations
- Keep the host and the key in your configuration, not in code: going live means changing those two variables.
- Use each event's
livemodeso you never mix test data with real data. - Before going live, work through the checklist.