← BRPix API documentation

Errors

Read the error format and learn how to resolve common errors.

Error format

API errors share the same JSON structure. Use error.code to identify errors in your application. The text in error.message may be returned in Portuguese.

{
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Saldo disponível insuficiente para esta transferência"
  }
}

Include the X-Request-ID response header when reporting an error to support.

Authentication errors

CodeHTTPCause and resolution
INVALID_CREDENTIALS401The key ID was not found or the secret is incorrect. Check the credentials in the dashboard.
CREDENTIAL_INACTIVE403The API credential is inactive or revoked. Activate a new credential in the dashboard.
IP_NOT_AUTHORIZED403The source IP address is outside the credential's allowlist. Add it in the dashboard.
MTLS_REQUIRED401Send your mTLS client certificate over the HTTPS connection.
MTLS_FINGERPRINT_MISMATCH401The certificate is not active for this organization. Check the certificate issued in the dashboard.
MISSING_TOKEN401The Authorization header is missing. Send Authorization: Bearer <access_token>.
INVALID_TOKEN401The token has expired, is malformed or has an invalid signature. Get a new token with POST /v1/auth/token or POST /v1/auth/refresh.
INSUFFICIENT_SCOPE403The token lacks the scope required by this endpoint. Check the credential's scopes in the dashboard.
INVALID_REFRESH_TOKEN401The refresh token was not found. It may have expired after seven days or been revoked. Authenticate again.

Validation errors

CodeHTTPCause and resolution
INVALID_REQUEST422The request contains invalid data. When present, details lists the affected fields.
MISSING_IDEMPOTENCY_KEY422A financial POST request is missing the Idempotency-Key header. Send a unique UUID v4.
AMOUNT_BELOW_MINIMUM422The amount is below the minimum for the account. Check your account limits.
AMOUNT_ABOVE_MAXIMUM422The amount exceeds the maximum for the account.
SPLIT_EXCEEDS_100422The split percentages add up to more than 100%. Adjust the allocation.
INSUFFICIENT_BALANCE422The available balance is lower than the transfer amount. Wait for pending payments to be confirmed.

Charge and transfer errors

CodeHTTPCause and resolution
CHARGE_NOT_FOUND404The charge does not exist or belongs to another account.
CHARGE_NOT_CANCELLABLE409The acquirer or the current charge status prevents cancellation.
CHARGE_FAILED502The acquirer could not create the charge. If the outcome is uncertain, verify the operation before creating a charge with another Idempotency-Key.
TRANSFER_NOT_FOUND404The transfer does not exist or belongs to another account.
NOT_IMPLEMENTED501The requested feature is not available.

Rate limit errors

CodeHTTPCause and resolution
RATE_LIMIT_EXCEEDED429This key exceeded 100 requests per minute. Wait the number of seconds in the Retry-After header before retrying.