API Keys
All API requests require authentication using an API key. Include your API key in theX-API-Key header of every request.
Key types
Bipa provides two types of API keys:| Prefix | Environment | Purpose |
|---|---|---|
bipa_prod_ | Production | Real transactions with real money |
bipa_test_ | Sandbox | Testing and development |
Making authenticated requests
Include your API key in theX-API-Key header:
Obtaining API keys
- Log in to your Bipa Console
- Navigate to Developers → API Keys
- Click Create new key
- Copy your key immediately — it won’t be shown again
You can only have one active API key at a time. Creating a new key will revoke the previous one.
Sandbox environment
The sandbox environment uses the same base URL but with test API keys:- No real money is moved
- Pix payments are executed in Bacen staging environment
- Crypto transactions are executed in testnets
Security best practices
Use environment variables
Use environment variables
Store API keys in environment variables, not in code:
Rotate keys regularly
Rotate keys regularly
Create new keys periodically and revoke old ones. This limits the impact if a key is compromised.
Revoke compromised keys immediately
Revoke compromised keys immediately
If you suspect a key has been compromised, create a new one immediately. This will automatically revoke the old key.
Monitor API usage
Monitor API usage
Review your API logs in the console regularly to detect unusual activity.
