Skip to main content
Send a TED from a customer account in Midaz or from your own core, and receive a TED for your customers.
The BACEN manuals for STR prevail over this page. Your institution validates the flow and implements it on the Lerian APIs. See how to read the diagrams.

Participants


  • Your institution. Your system. It sends the TEDs, reads them and receives the events.
  • TED Lerian. The TED interface between Midaz and Lerian SPB. It checks each TED, moves the money in Midaz and publishes the events. Streaming Hub delivers the events to your system.
  • Midaz. The ledger. It keeps the customer accounts and their balances.
  • Lerian SPB. Lerian’s STR messaging. It sends and receives the STR messages and reports their settlement.
  • STR (BACEN). The BACEN reserve transfer system. It settles each TED between the reserve accounts.
  • Sending institution. Another institution. It sends a TED to a customer of yours.

Before you start


  • Set your usage limits with PUT /v1/policy/limits.
  • Load the national holiday calendar of each year with PUT /v1/policy/holidays, before the year starts. A loaded year covers every date in it. On a date whose year is not loaded, TED Lerian refuses the TED.
  • Optionally, set your cut-off with PUT /v1/policy/window. It cannot be later than the official close.
  • To charge a fee, create a Midaz fee package on the ledger that selects on the TED Lerian posting labels.
  • To receive TEDs, bind your ISPB to the Midaz organization and ledger that receive the credits, with PUT /v1/policy/ispb-bindings. The binding needs the organization in Midaz, the @external/BRL account on the ledger, and your institution’s holder with an account in the CRM.
  • Each account that receives TEDs has a holder and an instrument in Midaz, with the branch, the account number and the account type in bankingDetails. See Register a holder and open an account.

Diagram


Send from a Midaz account

Send and receive TED: Send from a Midaz account

Send from your own core

Send and receive TED: Send from your own core

Receive and credit

Send and receive TED: Receive and credit

Return when the account cannot receive

Send and receive TED: Return when the account cannot receive

Receive into an account of your institution

Send and receive TED: Receive into an account of your institution

Rules


  • Accepted is not settled. A 201 with SUBMITTED means that Lerian SPB accepted the TED for sending. The held money leaves the source account only after the STR settles the TED.
  • Usage limits count the amount plus the fee. A rejected or cancelled TED frees them again.
  • When the recipient’s bank is your own ISPB, the transfer is internal (type set to INTERNAL). Midaz settles it, and nothing goes to the STR.
  • From your own core, set party on the sender and on the recipient. Without it, the party is institution, and Lerian SPB sends a different STR message.
  • TED Lerian credits an incoming TED once, also when Lerian SPB delivers it twice.
  • When the account cannot receive an incoming TED, TED Lerian returns it with the official reason:
    • 1: a closed account.
    • 2: no account at that branch and number.
    • 5: the holder’s document does not match.
    • 84: the account type in the TED is not the account’s type.
  • An account counts as closed when its closing date is today or earlier, in Brasília time.
  • When TED Lerian cannot decide on its own, the TED goes to MANUAL_REVIEW.

How you know it finished


What can go wrong


The TED Lerian error list describes each code.