Skip to main content
The API groups outcomes by HTTP status code: 2xx means the request worked as expected, 4xx means it failed because of invalid information or a validation error, and 5xx means something went wrong on Trio’s side. Every error also returns a JSON body that tells you what went wrong, so you can handle it during the integration.

Error body

  • error.error_code: stable UPPER_SNAKE identifier of the error, for programs and logs. Branch on this, not on the message.
  • error.error_message: human-readable explanation of the error.
  • error.errors: only on INVALID_PARAMETER for a request outside the operation’s schema, one entry per offending field, with a JSON pointer in field and what is wrong with it in message.

HTTP status codes

Error codes

Business rules

When a request is well formed but breaks a business rule, the API answers 422 and error_code carries the code of the rule the request breaks. The rule codes below are the ones documented for V1; V2 answers them with 422 instead of the 400 or 404 shown by V1.
CodeMessage
ALREADY_EXISTS_RESOURCEJá existe um para a referência informada.
INVALID_RESOURCE é inválido.
ENTITY_IN_ANALYSISEntidade está em análise, aguarde a aprovação. Referência: #.
ENTITY_INVALID_CURRENCYMoeda da transação diferente da informada na entidade. Utilize a moeda #.
ENTITY_INVALID_ADDRESSEntidade não possui endereço válido. Referência: #.
BANK_ACCOUNT_IN_ANALYSISConta bancária está em análise, aguarde a aprovação. Referência: #.
BANK_ACCOUNT_DAILY_TRANS_LIMIT_REACHEDLimite diário de transações atingido.
BANK_ACCOUNT_DAILY_AMOUNT_LIMIT_REACHEDLimite diário de valor de transações atingido.
BANK_ACCOUNT_OVERNIGHT_TRANS_LIMIT_REACHEDLimite noturno de transações atingido.
BANK_ACCOUNT_OVERNIGHT_AMOUNT_LIMIT_REACHEDLimite noturno de valor de transações atingido.
BANK_ACCOUNT_MIN_SINGLE_TRANS_AMOUNT_REACHEDLimite mínimo do valor da transação não foi atingido.
BANK_ACCOUNT_MAX_SINGLE_TRANS_AMOUNT_REACHEDLimite máximo do valor da transação atingido.
BANK_ACCOUNT_MAX_COUNTERPARTY_TRANS_REACHEDLimite diário de transações para uma contrapartida atingido.
BANK_ACCOUNT_MAX_COUNTERPARTY_AMOUNT_REACHEDLimite diário de valor de transações para uma contrapartida atingido.
PIX_KEY_CANCELEDChave Pix está cancelada. Referência: #.
PIX_KEY_CONFIRMEDChave Pix já foi confirmada. Referência: #.
PIX_KEY_ALREADY_EXISTSJá existe uma chave Pix criada ou confirmada. Referência: #.
PIX_KEY_INVALID_KEY—
PIX_KEY_REQUIREDA chave deve ser informada quando o tipo é ‘random_key’.
PIX_KEY_INVALID_TYPEO tipo deve ser: ‘tax_number’, ‘email’, ‘phone’ ou ‘random_key’.
PIX_KEY_CONFIRMATION_TYPE_INVALIDConfirmação com código deve ser executada somente para chaves Pix do tipo: ‘email’ ou ‘phone’.
PIX_KEY_PENDINGChave Pix não foi confirmada. Referência: #.
COLLECTING_DOCUMENT_NOT_SETTLEDDocumento de recebimento não está liquidado. Referência: #.
COLLECTING_DOCUMENT_WITHOUT_BALANCEValor da devolução #, maior que o saldo # do documento de recebimento.
PAYMENT_BRCODE_ALREADY_USEDBrcode #, já possui um documento vinculado #.
PAYMENT_AMOUNT_ERRORValor de pagamento # deve ser igual ao valor do brcode #, valor #.
PAYMENT_ACCOUNT_WITHOUT_BALANCESaldo insuficiente para executar o pagamento. Saldo atual #.
QUERY_LIMIT_REACHEDLimite de consultas atingido. Tente novamente em 1 minuto.
KEY_NOT_FOUNDChave Pix não foi encontrada. Referência: .
BRCODE_NOT_FOUNDBrcode não foi encontrado. Referência: .
KEY_NOT_FOUND_MULTI_ATTEMPTSChave Pix não foi encontrada. Crie a chave e tente novamente em 1 hora. Referência: .

Next steps