ALLOW, REVIEW or DENY.
The plugin pages say when each plugin asks, and what each answer does: Pix Lerian, Pix BTG, Pix JD, TED Lerian and TED JD.
The evaluation call
The plugin sends a
POST of a JSON body to the endpoint of the route. Your institution writes the route. The call carries these headers:
The endpoint can also receive a
HEAD request with no authentication. The plugin sends it to keep the connection warm and ignores the answer.
The schemas are open: none forbids extra properties. Validate a body with the schema that the header names, and ignore every field you do not know. A body can match more than one schema, so trust the header, never the shape.
Authentication
The route names oneauth.mode. Every mode sends the headers above. A route can add its own static headers, and the credential bundle can add more. The headers of the contract cannot be overridden.
The plugin caches the token and refreshes it. A
401 on a call with a token drops the token, and the plugin repeats the call once at once. A second 401 is final.
The answer
Answer200 with a JSON body:
202 answer counts as REVIEW, and it needs an analysisId, unless the body says DENY. A DENY is honored in a 202 too, and it needs no analysisId.
The plugin reads a body of at most 64 KiB, and ignores unknown fields. It drops a malformed side field and keeps the decision. The side fields are a reasons entry with an empty, non-string or control-character code, an invalid analysisId on ALLOW or DENY, and a score that is not a string or a number.
A DENY or a REVIEW with a reason that has the code AG01, on a received Pix, makes Pix Lerian refuse the Pix with AG01 and Pix BTG and Pix JD refuse it with DS04, without the fraud mark. See the plugin pages.
What is not a decision
Any status other than200 or 202 is not a decision. So is a decision outside the three values, and a REVIEW with no valid analysisId. In every case the posture of the route decides: an OPEN band allows, and a CLOSED band denies. A received TED is the exception: TED JD and TED Lerian hold it for a person of your institution, and no posture applies.
The plugin never follows a redirect. In BYOC, the plugin refuses an
http destination or a private address unless the deploy lists the host. The plugin does not repeat a call to a destination whose certificate does not verify, and it denies the operation in any posture.
The resolve call
When the plugin holds an operation on a
REVIEW, the partner decides later and sends the final decision to the plugin. The route is the plugin’s own, in its own vocabulary. The plugin page names it. The call takes the Authorization header with the token of an application that holds the decision permission of the plugin, and these fields:
The body is at most 16 KiB.
The feedback call
When the route has a
feedbackEndpoint, the plugin can report how an evaluated operation ended. It sends a POST to that address with the same auth mode as the evaluation. The Idempotency-Key is the key of the evaluation, a colon and the outcome. The partner must apply each outcome once, and answers 200 or 202.
408, a 429, a 5xx, a network error or an open breaker. A refused report, such as a 4xx or a malformed one, is final.
Common rules of the payloads
- A field that the rail did not bring is absent. Absent means that the rail did not say.
- The
amountis a string with two decimals, with 1 to 16 integer digits, for example1500.00. Thecurrencyis alwaysBRL. - Times are RFC 3339 UTC.
payerpays andpayeereceives, from the point of view of the money.flowisEXTERNALwhen the other side is at another institution, andINTRAwhen both sides are accounts of your institution.metadatais a JSON object that the origin of the operation sent. The plugin passes it on without reading it. Where a plugin page says that it carries metadata, the partner receives it only on this call.
party has these fields. Only ispb is always present. The sections below say which others each schema requires.
ted-out.v1
A TED that your institution sends, or an internal transfer seen from the payer side.
ted-in.v1
A TED that your institution receives, or an internal credit seen from the payee side.
pix-out.v1
A Pix that your institution sends, or an internal Pix seen from the payer side.
pix-cashin.v1
A Pix that your institution receives, or an internal Pix seen from the payee side. It never carries a received return.

