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.

SandboxLive
Hosthttps://api-sandbox.caibopay.apphttps://api.caibopay.app
Keypsp_test_…psp_live_…
MoneyTestReal
livemode in eventsfalsetrue
environment in GET /v1/accountsandboxlive

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_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.

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 happensYou receive
has any other amountIt executes at oncepayout.completed
ends in .13 (for example 100.13)The bank refuses it and the balance returnspayout.failed
ends in .17The bank never answers: it stays in verification with the balance heldstatus verification_pending
goes to an account ending in 0000 (CLABE, PIX key or CCI)The destination bank refuses it and the balance returnspayout.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 livemode so you never mix test data with real data.
  • Before going live, work through the checklist.

Sur cette page