ALLOW, REVIEW or DENY. Each check is off by default. You turn it on for your institution.
The four checks
Each check is a flow. A flow has its own settings, route and credentials.
A P2P transfer with both internal flows on goes to the partner twice: the payer side first, then the recipient side. The recipient side has its own evaluation key, the
transferId followed by .in. TED JD stops at the first refusal. It never screens the refund leg of a returned TED, and it never screens a return.
Sent TEDs, cross-core TEDs and P2P
TED JD asks the partner when you confirm the transfer with
POST /v1/transfers/process, before it sends anything. For a TED OUT and a cross-core TED, it asks after it holds the amount and reserves the usage limit. For a P2P transfer, it asks before it posts in Midaz. The partner has at most the syncBudgetMs of the route, which is 4000 ms or less. For a TED OUT, Send (TED OUT) describes the answers in full. Cross-core TEDs and P2P follow the same rules.
For a P2P transfer, TED JD posts nothing to the ledger while a
REVIEW waits. The amount of the payer and the fee stay in hold in Midaz, in one transaction, or in one group when the transfer crosses two ledgers. An ALLOW on the payer side can open the analysis of the recipient side. The call then answers FRAUD_ANALYSIS again, with a new analysisId, and TED JD sends transfer.fraud_analysis again.
When the partner cannot answer, the posture of the route decides. OPEN lets the transfer go on, and fraudCheck shows the origin FALLBACK and the cause. CLOSED rejects it like a DENY. TED JD rejects the transfer with BTF-0126, under any posture, when the route is not set, when the credential bundle is missing, or when ANTIFRAUD_SECRETS_BACKEND is empty. If TED JD cannot read whether a check is on, /process answers 503 with BTF-0125 before it holds anything.
decideBy follows the rule of a TED OUT: the earliest of the confirmation plus 30 minutes, the confirmation plus the review window of the tenant, and expiresAt of the initiation, less 7 minutes and 30 seconds. The close of the operating window counts only for a transfer that has one, so a P2P transfer and a cross-core TED ignore it. With flows on at both sides of a P2P transfer, the shortest review window applies.
A transfer in FRAUD_ANALYSIS ends in one of these ways:
- The partner decides on the decision route. On
DENY, TED JD rejects the transfer. OnALLOW, it sends the TED OUT, sends the cross-core credit, or commits the P2P hold. - Your back office decides on the same route, and adds a justification. On a P2P transfer, an
ALLOWof your back office decides the whole transfer, and TED JD does not ask the partner about the other side. - You cancel it. See Cancel a transfer. TED JD releases the hold and the usage limit.
decideBypasses. TED JD rejects the transfer, and releases the hold and the usage limit.transfer.rejectedcarriesfailureCodeBTF-0127.
Received TEDs
With the
in flow on, TED JD asks the partner before it credits a TED that it received from the STR. The partner has at most the syncBudgetMs of the route, which is 4000 ms or less. This flow takes no posture, and TED JD refuses a route that carries one.
The credit window is 60 minutes from the settlement of the TED, or from receipt when the TED carries no settlement time (Res. BCB 256, art. 8).
decideBy is that deadline less 15 minutes.
A held TED shows in the queue of retained messages. Read it with GET /v1/transfers/ted-in/retained and the reason FRAUD_REVIEW_PENDING or FRAUD_REVIEW_DESK. Each held message carries transferId, fraudCheck and creditDeadlineAt. A pending hold also carries decideBy.
FRAUD_REVIEW_PENDING: the partner answeredREVIEWand decides untildecideBy.FRAUD_REVIEW_DESK: nobody decides it until a person does. The partner did not answer, or itsREVIEWpasseddecideByandantifraud.in.auto_return_enabledis off.
- The partner decides on the decision route, with its application token, under the
transferId. - A person decides on the desk.
POST /v1/transfers/ted-in/fraud-holds/{messageId}/resolvetakesAuthorization,X-Idempotencyand a body withdecision(ALLOWorDENY) and ajustificationof 10 to 500 characters.messageIdis theidof the row in the retained queue. The route needs thetransferspermission with the actionresolve, which theeditorrole holds. Only a person can call it: an application gets403withBTF-0406. decideBypasses. Withantifraud.in.auto_return_enabledon, TED JD returns the TED with code 9. With it off, the TED goes to the desk, and TED JD sendstransfer_incoming.fraud_analysisagain withretentionReasonFRAUD_REVIEW_DESK.
ALLOW, or returns the TED with code 9 on DENY, so the effect comes at the next poll. A decision after creditDeadlineAt is still applied, late.
The desk answers 400 with BTF-0001 when X-Idempotency is missing or messageId is not valid. It answers 409 with BTF-0128 when the partner, another person or the deadline already decided the hold. It answers 404 with BTF-0200 when no open hold exists for the message, and 403 with BTF-0405 when the caller lacks the permission. After a 5xx, read the hold, and if it is still open, send the decision again under a new X-Idempotency key. Do not close a held TED with the close of unsettled TED IN: it answers BTF-0217. A TED that you settled outside the platform still gets the action of the decision, so a DENY returns money that you already moved. Read the TED and the ledger before you decide a hold older than the credit window.
A person who decides a received TED on the decision route of the partner gets 403 with BTF-0405, and the partner that decides a TED it did not answer gets 409. The desk is the route of the person.
transfer_incoming.undeliverable carries rejectionCategory fraud_denied when the partner or a person denied the TED, and fraud_review_expired when the review ran past decideBy and the tenant auto-returns.
Received cross-core credits
With the
intra_in flow on, TED JD asks the partner before it books a credit that another core of your institution relays. Nothing waits on this flow: an answer other than ALLOW refuses the credit at once. REVIEW is a refusal here.
When TED JD refuses the credit, it books nothing and answers the paying core. It sends transfer_incoming.refused with reason antifraud and the fraudCheck. When the partner cannot answer, the posture of the route decides: CLOSED refuses the credit, and OPEN books it. A credit that the ledger refuses after an ALLOW is refused with reason ledger_refused, and the event carries the fraudCheck too.
Turn a check on
In BYOC, you write the route and the credential as Configuration describes. Each flow has its own route, credential bundle and switch.
Decide a held transfer
POST /v1/transfers/{evaluationKey}/fraud-decision applies the final decision of an analysis. The evaluationKey is the key that the partner received: the transferId for a TED OUT, a cross-core TED, a received TED and the payer side of a P2P transfer, and the transferId followed by .in for the recipient side of a P2P transfer. The call takes these parts:
A call from an application is the decision of the partner, and the record shows
resolutionOrigin PARTNER. A call from a person is a decision of your back office, with resolutionOrigin OPERATOR. resolvedBy is the subject of the token. The caller must be identified: a token that names neither a person nor an application gets 403.
DENY rejects the transfer and releases the hold and the usage limit. ALLOW resumes it. The answer carries the status of the transfer. A held TED that the partner decides here is credited or returned at the next re-drive.
A cross-core credit is never decided on this route, because it never waits.
The outcome of each screened transfer
When the route of a flow has a
feedbackEndpoint, TED JD reports how each screened transfer ended, once for each side that the partner evaluated. The Idempotency-Key is the evaluation key, a colon and the outcome. TED JD repeats a report after a transient failure for up to 24 hours after the last change of the transfer, and the partner must apply each outcome once.
Events
transfer.fraud_analysis and transfer_incoming.fraud_analysis carry no party name, document or account. transfer_incoming.refused carries the payer’s name, document, ISPB, branch and account and the payee’s document, ISPB, branch and account, as the paying core sent them. Send it to a destination that handles personal data. See Webhooks for the other events of a transfer.
What the partner implements
TED JD sends the evaluation as described in What the partner receives: the schema, the headers, the signature and the answer rules. For the full contract the partner implements, see Antifraud partner contract.

