application/problem+json media type:
type– A URI that identifies the error in the Lerian error catalog, built ashttps://errors.lerian.studio/v1/<code>. A response with nocodecarries the RFC defaultabout:blank.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. A request the rail refused before it reached a handler carries nocode. 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.
Four codes carry more than one status, because the condition they name has more than one shape on this rail. Each appears below under each status it can arrive with.
When BACEN refuses a payment, the refusal carries the network’s own ISO 20022 status reason. RJCT is the one that names a refusal. On the API surface, SPI-1002 is the code for that refusal. To find which payments the network refused, read the rejected payments report. It lists each one by terminal status and end-to-end id.
401: Unauthenticated
403: Forbidden
404: Not found
409: Conflict
413: Payload too large
422: Unprocessable
429: Too many requests
500: Server error
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 cover the tokens the rail handles today, across 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 line by line. An accepted line settles. 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. Your reconciliation maps the answer against the scheme’s own error sheet. Two rejections refuse a line before any business rule runs, so they are the first ones a new integration meets.
063 (Cadastro, Cliente nao cadastrado) says the file header names a recebedor that this deployment does not hold a registered profile for. 096 (Registro, Inválido) says the scheme refused the record and 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 movement 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.
