Sending a TED
1
Validate
TED Lerian checks the amount format, the 5-digit purpose code, the recipient’s bank in the STR participant list. It also checks that the recipient document is a CPF or a CNPJ. A failure here creates no transfer.
2
Apply the policy
It checks the effective window (the official STR schedule, the institution’s cut-off and the holidays), the usage limits and, when configured, the fee calculated by Midaz.
3
Hold
TED Lerian holds the amount plus the fee on the source account. Status
RESERVED.4
Send to the STR
Lerian SPB accepts the command and returns the
nuop. Status SUBMITTED. This is the status the create response usually shows.5
Settle
The STR decides asynchronously: it settles, rejects or keeps the entry pending. The outcome arrives as an event and on a read.
Statuses of a sent transfer
Accepted is not settled. A
201 confirms that the TED was accepted and, as a rule, sent. The money left only when the status is SETTLED. A refusal by the ledger or by Lerian SPB can already come in the create response (rejection.source LEDGER or RAIL). A refusal by the STR or by an operator shows only on a later read.Internal transfers
When the recipient’s bank is the institution’s own ISPB, TED Lerian finds the recipient account in the Midaz CRM. It settles everything in one Midaz transaction. The STR window does not apply, but usage limits and, when configured, the fee do. The response has
type=INTERNAL and recipient.accountId filled in. If the recipient does not exist or belongs to another organization, TED Lerian refuses the request with TED-1021 and creates no transfer.
Receiving a TED
1
Record
Lerian SPB reports that the STR settled a TED for the institution. The 60 minute deadline starts at
interbankSettledAt.2
Route
TED Lerian finds the ISPB binding of the receiving institution. Without a binding, the TED goes to manual review.
3
Find and check
TED Lerian looks up the recipient’s branch, account and document in the Midaz CRM. The holder and the account type have to match.
4
Decide
It credits the customer, returns the TED with the official reason, or sends it to manual review.
When Lerian SPB delivers a TED twice, TED Lerian credits it only once.
When another institution returns your TED
TED Lerian finds the original transfer, records the return in the transfer’s
returned block and credits the sender back. The transfer stays SETTLED, and transfer.returned tells your system. By default, TED Lerian does not refund the sending fee. returned.feeRefunded says whether it did.
If no settled transfer carries the control number of the returned TED yet, TED Lerian holds the return. It applies the return when that transfer settles. An operator lists the held returns with GET /v1/reconciliation/held-returns.
Cancellation
Incoming TEDs are never cancellable.
Reconciliation and unblocking
A transfer with no answer in time enters the reconciliation queue with its age and last known status. By default, TED Lerian asks Lerian SPB for the outcome 15 minutes after it accepts the transfer, and tries up to 8 times. Settled turns the hold into a debit, and rejected releases the hold. Any other answer, not found included, keeps the hold until the next attempt. When the attempts run out, the transfer becomes
EXHAUSTED and an operator unblocks it with the evidence. Nothing is reversed without evidence.
A periodic check also looks for inconsistencies between Midaz and the transfer statuses, such as a return with no recredit or an orphan hold. It lists them for the operator.
