Efí Sandbox Guide
Set up and test with the Efí sandbox environment
Creating an Efí Account
- Go to dev.efipay.com.br
- Click "Criar Conta" (Create Account)
- Fill in your details (CPF or CNPJ)
- Verify your email
- Accept the terms
Creating a Sandbox Application
Once logged in:
- Click "Aplicações" (Applications)
- Click "Criar nova aplicação" (Create new application)
- Choose a name (e.g., "pixcli Test")
- Select Sandbox environment
- Click "Criar" (Create)
Downloading the Certificate
For sandbox:
- Go to your application
- Click "Certificados" (Certificates)
- Download the sandbox P12 certificate
- Save it to
~/.pixcli/certs/sandbox.p12
The sandbox certificate has no password.
Getting OAuth Credentials
From your application dashboard:
- Find "Client ID" — copy this value
- Find "Client Secret" — copy this value
You'll enter these during pixcli config init.
Configuration
pixcli config initWhen prompted:
- Backend:
efi - Environment:
sandbox - Client ID: Paste from dashboard
- Client Secret: Paste from dashboard
- Certificate:
/home/user/.pixcli/certs/sandbox.p12 - Password: (leave blank)
- Pix key: Any value (doesn't need to be real)
Testing Balance
pixcli --sandbox balanceIf successful:
💰 Account Balance
Available: R$0.00(Sandbox starts with R$0.00.)
Creating Test Charges
pixcli charge create --amount 25.00 --key "email@example.com"In sandbox, charges under R$10.00 are automatically confirmed without needing to scan the QR code. Perfect for testing.
Simulating Payments
In the Efí sandbox dashboard, you can manually confirm charges:
- Go to "Cobranças" (Charges)
- Find your test charge
- Click "Simular Pagamento" (Simulate Payment)
The payment appears in pixcli pix list immediately.
Webhook Testing
Register a sandbox webhook:
pixcli --sandbox webhook register --key "email@example.com" --url "https://webhook.site"webhook.site provides free webhook testing URLs that capture and display all requests.
Then create a charge and simulate a payment in the dashboard — you'll see the webhook event appear in webhook.site in real-time.
Sandbox webhooks do NOT require mTLS. This makes testing much simpler than production.
Sandbox Quirks
| Behavior | Notes |
|---|---|
| Auto-confirm < R$10 | Charges under R$10 settle instantly |
| No real payments | Charges never touch actual bank accounts |
| Instant settlement | Confirmed charges settle immediately (no 1-3 day wait) |
| No mTLS for webhooks | Any HTTPS endpoint works |
| Temporary data | Sandbox data may be cleared periodically |
Next Steps
- Production setup when ready to go live
- Troubleshooting if issues arise