For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
StatusDashboard
  • Getting Started
    • Introduction
    • Authentication
    • Rate Limits
    • Error Handling
  • Guides
    • Cash-In (Receiving Payments)
    • Cash-Out (Sending Payments)
    • PIX Keys Management
    • Webhooks Integration
    • MED (Special Returns)
  • API Reference
LogoLogo
StatusDashboard
On this page
  • Error Handling
  • HTTP Status Codes
  • Error Response Format
  • Common Error Codes
  • Authentication Errors
  • Validation Errors
  • Transaction Errors
  • Limit Errors
  • Idempotency
Getting Started

Error Handling

Was this page helpful?
Edit this page
Previous

Cash-In (Receiving Payments)

Next
Built with

Error Handling

The BRZ API uses standard HTTP status codes and returns structured JSON error responses.

HTTP Status Codes

Status CodeMeaning
200Success
201Created successfully
400Bad Request — invalid parameters or missing fields
401Unauthorized — invalid or missing authentication
403Forbidden — insufficient permissions
404Not Found — resource does not exist
409Conflict — duplicate resource or pending request
429Too Many Requests — rate limit exceeded
500Internal Server Error — unexpected server error

Error Response Format

All error responses follow this structure:

1{
2 "success": false,
3 "error": "Human-readable error message",
4 "code": "MACHINE_READABLE_ERROR_CODE"
5}

Common Error Codes

Authentication Errors

CodeDescription
UNAUTHORIZEDMissing or invalid Bearer Token
INVALID_API_KEYInvalid x-key-id or x-secret-key
TOKEN_EXPIREDJWT token has expired

Validation Errors

CodeDescription
validation_errorRequest body validation failed
missing_fieldsRequired fields are missing
invalid_key_typePIX key type must be CPF, CNPJ, EMAIL, PHONE, or EVP

Transaction Errors

CodeDescription
TRANSACTION_NOT_FOUNDTransaction ID does not exist
INSUFFICIENT_BALANCENot enough balance for the operation
DUPLICATE_EXTERNAL_IDDuplicate external_id for this client
receiver_not_foundReceiver PIX key not found internally

Limit Errors

CodeDescription
LIMIT_EXCEEDEDTransaction exceeds the configured limit
PENDING_REQUEST_EXISTSA pending limit change request already exists

Idempotency

Use the X-Idempotency-Key header (UUID format) to prevent duplicate operations. If you send the same idempotency key twice, the API returns the original response instead of creating a duplicate.

$curl -X POST https://api.brzip.com.br/api/v1/pix/cash-out \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -H "X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
> -d '{ "amount": "100.00", "pix_key": "12345678901", "pix_key_type": "CPF" }'