> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# TED Lerian events

> The lifecycle events TED Lerian publishes for sent TEDs, incoming TEDs and returns, how they are delivered and how to deduplicate them.

TED Lerian publishes an event at each lifecycle step of sent transfers, incoming TEDs and returns, on the platform event backbone. Streaming Hub delivers them to your institution's systems.

## How delivery works

***

* **At least once.** An event can arrive more than once. Once TED Lerian records the status change, it never loses the event.
* **Only after the change commits.** TED Lerian writes the event in the same transaction as the status. No event describes a status that later disappears.
* **Deduplicate on `ce-id`.** The identifier is deterministic: the same transition always produces the same `ce-id`.
* **Do not rely on arrival order.** Order events by the lifecycle and by the timestamps inside each event.
* **CloudEvents 1.0.** The type is `studio.lerian.br-ted.<resource>.<event>`. `ce-subject` is the id of the transfer, the incoming TED or the return.
* Money comes as a string (`"1500.00"`). Timestamps are in UTC.

## Catalog

***

| Event | When it happens |
| - | - |
| `transfer.created` | A TED or internal transfer was accepted and recorded; nothing is held or sent yet. The only event that carries `clientReference`. |
| `transfer.reserved` | The amount plus the fee is held on the source account; the TED is about to go to the STR. |
| `transfer.submitted` | The TED was sent to the STR; the hold stays while the STR decides. |
| `transfer.pending_str` | The STR acknowledged the TED and did not settle it yet; the hold stays. |
| `transfer.settled` | The STR settled the TED, or Midaz settled an internal transfer. Final status. |
| `transfer.rejected` | Refused by the ledger, Lerian SPB, the STR or an operator. Final status. |
| `transfer.cancelled` | The cancellation took effect before the money left. Final status. TED Lerian releases the hold after this event. |
| `transfer.awaiting_reconciliation` | The outcome of a call to Midaz or Lerian SPB is unknown. The hold stays, and automatic reconciliation asks Lerian SPB for the outcome. |
| `transfer.exhausted` | Automatic reconciliation gave up; the transfer waits for an operator decision. |
| `transfer.returned` | The receiving institution returned a settled TED. The transfer status does not change. TED Lerian credits the sender back after this event. |
| `incoming_transfer.received` | A TED settled at the STR was received and recorded; it is not credited yet. |
| `incoming_transfer.credited` | The amount was credited to the recipient's account. |
| `incoming_transfer.manual_review` | An incoming TED could not finish on its own; nothing is credited until the operator decides. |
| `incoming_return.requested` | A return of an incoming TED was accepted and is going to the STR with the official reason. |
| `incoming_return.returned` | The STR settled the return; the money went back to the sending institution. |
| `incoming_return.failed` | The return did not finish: the STR refused it or it stopped for an operator. The incoming TED goes to manual review. |

> [!TIP]
>
> "Reconciled" has no event of its own. It is a `transfer.settled` or `transfer.rejected` whose `previousStatus` is `AWAITING_RECONCILIATION` or `EXHAUSTED`. A subscriber of `transfer.settled` also receives the settlements resolved by reconciliation or by an operator.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.