application/problem+json media type:
type– A URI that identifies the error in the Lerian error catalog, built ashttps://errors.lerian.studio/v1/<code>.title– The HTTP status text (for example,Unprocessable Entity).status– The HTTP status code.detail– A human-readable explanation for this occurrence. The text varies with the occurrence, so branch oncode.code– A stable identifier for the condition. This API uses two vocabularies here: the rail’s ownSPI-NNNNcodes, and the Pix key directory tokens described further down.errors– Optional list of per-field validation details, each with amessage, alocation, and the offendingvalue.correlationId– The request-scoped correlation identifier. Quote this value in a support request.
5xx responses, the rail replaces detail with internal error so internal causes stay inside. Use code to branch programmatically.
Rail codes
The
SPI-NNNN codes name conditions the SPI rail itself judges. The digit after the prefix groups them: 0 input, 1 rail transport, 2 authorization, 3 processing, 4 rate and quota, 9 fallback.
A code can carry more than one status when the condition it names has more than one shape on this rail.
SPI-1002 means BACEN refused the message when the rail submitted it. A refused payment moves to REJECTED. BACEN can also refuse a payment later, in its status reply (pacs.002). That refusal is not an HTTP error, and the payment moves to REJECTED. To find which payments the network refused, read the rejected payments report. It lists each one by status and end-to-end id.
400: Bad request
401: Unauthenticated
403: Forbidden
404: Not found
409: Conflict
413: Payload too large
422: Unprocessable
429: Too many requests
500: Server error
501: Not implemented
502: Bad gateway
503: Service unavailable
These codes name dependency conditions. Back off and retry.
504: Gateway timeout
Pix key directory tokens
The Pix key directory keeps its own error vocabulary, and the rail forwards it. A directory refusal reaches you with the directory’s own token in
code and the directory’s own HTTP status in status. The type URI carries the same token as its last segment.
This vocabulary belongs to the directory, so treat it as open. Handle a token you do not recognize by its status, and read the token itself as the reason. The tables below list directory tokens for key registration, key lookup, key deletion, and the claim operations.
A rate-limit refusal from the directory reaches you as
SPI-4001 with HTTP 429. When the directory prescribed a wait, the response carries it in Retry-After. See the rail codes above.General
Key registration
Key claims
BR Code file rejections
The BR Code batch file channel answers a submitted remessa in a return file. A refused line carries a three-digit rejection code. It also carries the field name and description that the Pix scheme publishes for that code. A refused file carries one code, and no line in it is judged. Your reconciliation maps the answer against the scheme’s own error sheet.
063 (Cadastro, Cliente nao cadastrado) refuses the whole file: its header names a recebedor that this deployment does not hold a registered profile for. 096 (Registro, Inválido) says the scheme publishes no more specific code for the field at fault. A record of the wrong length is one of these.
Four more cover the two identifiers that most lines carry. 012 (Chave pix, Chave inválida) says the line collects on a Pix key that this deployment does not hold a registered recebedor for. 014 (Chave pix, Não é compatível com o cnpj ou agência e conta informada) names a key registered to another recebedor. The file header resolves to a different one. 016 (Identificador (txid), Em duplicidade) says the txid repeats. 017 (Identificador (txid), Inválido ou não encontrado) says the txid is malformed or names a charge this rail does not hold.
The scheme’s error sheet publishes many more codes. The channel renders the subset that its own refusals map onto. Each rejected line names its field, so read the field name first and the code second.
