Close a held return with ledger evidence (operator)
Operator action. Records the closure with the ledger transaction ledgerTransactionId as evidence, the operator, and the time.
- When no TED Lerian transfer carries the
NumCtrlSTR, the evidence is the transaction that credited the sender. - When the transfer that carries it ended
REJECTEDorCANCELLED, the STR settled a TED that TED Lerian recorded as failed, and the return reverses that settlement. The sender was never debited, there is nothing to credit, and you must never credit the sender. The evidence is the transaction that released the sender’s hold, and the response shows thattransferStatus.
TED Lerian does not move money. It never refunds a closed return, even if the original TED settles later. A return already closed with the same transaction returns the recorded closure. A return closed with another transaction, or one that TED Lerian already took when the TED settled (refunded or parked for review), returns 409 TED-0060. A return that a transfer which can still settle carries returns 409 TED-0067: TED Lerian refunds the sender when that transfer settles. Always check X-Idempotency-Replayed.
Autorizaciones
JWT token that the Lerian Access Manager issues for your institution. Send it in Authorization: Bearer <token> on every call (except the public health probes). The tenant never comes from the body, the query, or the path. Each operation requires a role with the matching permission (see the API overview). Without it, 403 TED-0071. Missing, invalid, or expired token: 401 TED-0070.
Encabezados
Replay window of the idempotency key, in seconds. Default 300 (5 minutes) when missing or invalid. Values outside 30 s to 7 days are adjusted to these limits. Only the value of the FIRST request for a key counts. A change to X-TTL on retries has no effect. The window sets how long the response is replayed.
x >= 1Idempotency key that the integrator creates (1 to 128 printable ASCII characters, no spaces; we recommend a UUID). Required on every operation with an effect. Send the SAME key again when you retry a call that failed because of a timeout or network error. Same key + same body returns the original response with X-Idempotency-Replayed: true and no new effect. Same key + different body responds 422 TED-0012. Same key still in processing responds 409 TED-0013 (retry after Retry-After). Missing or in the wrong format: 400 TED-0011.
Correlation identifier of this request (UUID). Optional: when you omit it, or when the value is not a well-formed UUID, the platform creates a UUID and returns it in the X-Request-Id header of the response. The resolved identifier goes to the logs, spans, and audit events of this request. Keep it to open a support ticket.
Parámetros de ruta
Identifier of the held return.
Cuerpo
Ledger transaction that evidences the closure: the one that credited the sender or, if the TED Lerian transfer that carries the return ended REJECTED or CANCELLED, the one that released the sender's hold (nothing to credit).
Respuesta
Held return closed. If X-Idempotency-Replayed: true, this is the replay of a previous closure.
Returned amount.
Identifier of the held return.
NumCtrlSTR of the returned TED (NumCtrlSTROr).
Official return reason (CodDevTransf).
Instant of the return at the STR.
TED Lerian transfer that carries the NumCtrlSTR of the returned TED. Null while no transfer carries it: TED Lerian did not send the TED, or its TED did not receive a NumCtrlSTR from a rail fact (in any status, SUBMITTED included).
Current status of that transfer; null without it. REJECTED or CANCELLED: the sender was never debited and there is nothing to credit. Never credit the sender; close the return with evidence.
Instant (UTC) of the closure.
Operator who closed the return.
Ledger transaction that evidences the closure: the one that credited the sender or, with transferStatus REJECTED or CANCELLED, the one that released the sender's hold (nothing to credit).

