Skip to main content
Cancel a TED that you sent before the STR settles it, or return a TED that a customer received.
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 cancels the TEDs it sent and returns the TEDs it received.
  • TED Lerian. The TED interface between Midaz and Lerian SPB. It checks each request, 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 cancels pending entries and settles each return.

Before you start


  • To cancel a TED that the STR holds as pending, this cancellation must be on for your institution. It is off by default.
  • To return a TED, you have the official return reason: a CodDevTransf code of the SFN domain dictionary.

Diagram


Cancel a TED pending at the STR

Cancel or return a TED: Cancel a TED pending at the STR

Return an incoming TED

Cancel or return a TED: Return an incoming TED

Rules


  • TED Lerian cancels a transfer in CREATED or RESERVED with 200 and releases any hold. While TED Lerian places the hold or sends the transfer, the answer is 409 with TED-0061.
  • For a transfer in PENDING_STR, TED Lerian asks the STR to cancel the entry. The answer is 202, and the hold stays until the STR answers. The result arrives as transfer.cancelled, transfer.settled or transfer.rejected.
  • A transfer already CANCELLED answers 200 again.
  • TED Lerian refuses to cancel a transfer in SUBMITTED, SETTLED or REJECTED.
  • This call returns only an incoming TED in CREDITED, and always in full.

How you know it finished


What can go wrong


The TED Lerian error list describes each code.