| title | Authentication |
|---|---|
| description | Secure your API requests with X-API-Key authentication. |
All API requests require authentication using an API key. Include your API key in the X-API-Key header of every request.
X-API-Key: bipa_prod_xxxxxxxxxxxxBipa provides two types of API keys:
| Prefix | Environment | Purpose |
|---|---|---|
bipa_prod_ |
Production | Real transactions with real money |
bipa_test_ |
Sandbox | Testing and development |
Include your API key in the X-API-Key header:
curl https://api.bipa.tech/v1/customers \
-H "X-API-Key: bipa_prod_xxxxxxxxxxxx" \
-H "Content-Type: application/json"import requests
response = requests.get(
"https://api.bipa.tech/v1/customers",
headers={
"X-API-Key": "bipa_prod_xxxxxxxxxxxx",
"Content-Type": "application/json"
}
)const response = await fetch("https://api.bipa.tech/v1/customers", {
headers: {
"X-API-Key": "bipa_prod_xxxxxxxxxxxx",
"Content-Type": "application/json"
}
});req, _ := http.NewRequest("GET", "https://api.bipa.tech/v1/customers", nil)
req.Header.Set("X-API-Key", "bipa_prod_xxxxxxxxxxxx")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)- Log in to your Bipa Infra
- Navigate to Developers → API Keys
- Click Create new key
- Copy your key immediately — it won't be shown again
The sandbox environment uses the same base URL but with test API keys:
curl https://api.bipa.tech/v1/customers \
-H "X-API-Key: bipa_test_xxxxxxxxxxxx"In sandbox mode:
- No real money is moved
- Pix payments are executed in Bacen staging environment
- Crypto transactions are executed in testnets
{/* TODO: update error response format
If authentication fails, you'll receive a 401 Unauthorized response:
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked.",
"doc_url": "https://docs.bipa.tech/errors#invalid_api_key"
}
}Common authentication issues:
| Error Code | Cause | Solution |
|---|---|---|
invalid_api_key |
Key doesn't exist or is malformed | Check the key format and copy it again |
revoked_api_key |
Key has been revoked | Generate a new key in the Bipa Infra dashboard |
missing_api_key |
No X-API-Key header |
Include the header in your request |
| */} |
{/* TODO: add IP allowlisting section */}