Sandbox
You can start using our Sandbox environment right now, no need to contact us. Feel free to test our service and integrate with our API. If you have any questions, just send them to help@carnau.com, we will answer you quickly, pinky promise. We are here to help you integrate with us ASAP.
About our Sandbox environment
Emulates production exactly
Same endpoints, same schemas, same error codes — only the credentials and base URL change.
Isolated server and database
Everything you create in Sandbox only exists in Sandbox. No production data ever touches the test environment.
70% of charges auto-pay
Boletos and Invoices issued in Sandbox are paid automatically within an hour. Use them to seed your test account.
Response times may differ
Sandbox emulates the underlying operations, so response latency may not match production.
What Sandbox doesn't do
- Pix keys registered in Sandbox aren't visible in production. Sandbox accounts can't receive or send real Pix.
- Boletos issued in Sandbox aren't registered with banks or the official registry. Real banks can't pay them.
- Card payments simulate authorization. No real card is ever charged.
- Webhook target URLs must be public HTTPS endpoints. For local development, use ngrok or a similar tunnel.
- Our Sandbox may fit some load testing. For intense load tests, reach out to us first.
Same code in both environments
Production and Sandbox use separate credentials — each environment has its own API ID and private key. To switch, change the "environment" parameter (or the base URL, if you call the REST API directly) and load the credentials for that environment. The resources, schemas, and error codes are identical between environments.
BASE URL - Production
https://api.carnau.com
BASE URL - Sandbox
https://sandbox.api.carnau.com
import carnau # Example key only — replace with your own. # Never hardcode private keys in source. Store them in an HSM, # or at minimum in an encrypted KMS. private_key_content = """ -----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC PARAMETERS----- -----BEGIN EC PRIVATE KEY----- MHQCAQEEIMCwW74H6egQkTiz87WDvLNm7fK/cA+ctA2vg/bbHx3woAcGBSuBBAAK oUQDQgAE0iaeEHEgr3oTbCfh8U2L+r7zoaeOX964xaAnND5jATGpD/tHec6Oe9U1 IF16ZoTVt1FzZ8WkYQ3XomRD4HS13A== -----END EC PRIVATE KEY----- """ # To go live: change environment to "production" and use your production project id + private key. # The project id is best loaded from an environment variable, not hardcoded in source. user = carnau.Project( environment="sandbox", id="5656565656565656", private_key=private_key_content ) carnau.user = user
Going to production
When you're ready, the switch from Sandbox to live takes a handful of steps.
- Open a production account in Web Banking (production also requires CNPJ verification).
- Generate a fresh ECDSA key pair for production — never reuse Sandbox keys.
- Register the production public key in the production Web Banking.
- Switch your code to production. In the SDK: change the environment from
"sandbox"to"production"and load the production Project's id and private key. If you call the REST API directly: swap the base URL fromsandbox.api.carnau.comtoapi.carnau.comand use the production signing key. - Update webhook target URLs to production-reachable HTTPS endpoints and re-create the subscriptions in production.
- Smoke-test with a small Pix amount before scaling traffic.
What's next
Now that your Sandbox account is open, the integration takes about 2 days end-to-end.
Generate ECDSA keys →
Create the key pair you will use to sign every API request.
IP Allowlisting →
It is a security mechanism that restricts access.
API Reference →
Browse every endpoint, request body, and response schema.
Have a question? Ask Arc.
Arc is our AI assistant trained on the entire Carnaú API. Get an answer in seconds — or talk to a human engineer.