Concepts
Integrate in four steps
1
Configure the institution
Do this once, with the
editor role. Set the usage limits with PUT /v1/policy/limits; they are required before the first TED. For incoming TEDs, set the ISPB to organization bindings with PUT /v1/policy/ispb-bindings. Optionally, set a cut-off with PUT /v1/policy/window.2
Send the TED
Send The send returns
X-Account-Id (the debited account) and X-Idempotency (a new key for each payment). To show the fee before you confirm, call POST /v1/transfers/fee-quotes with the same fields.201 with the status the TED reached in this call, usually SUBMITTED.3
Track it until settlement
Query
GET /v1/transfers/{transferId} until status reaches SETTLED, REJECTED or CANCELLED, or subscribe to the transfer.* events. On REJECTED, rejection.source and rejection.code tell you who refused it and why.4
Handle incoming TEDs
List them with
GET /v1/incoming-transfers. The credit to the customer is automatic. Only status=MANUAL_REVIEW requires an operator decision (POST /v1/incoming-transfers/{incomingTransferId}/resolve-review), and POST /v1/incoming-transfers/{incomingTransferId}/return returns a TED that is already credited.Statuses
A sent TED goes through these statuses. The final statuses are
SETTLED, REJECTED and CANCELLED.
An incoming TED goes from
RECEIVED (decision in progress) to CREDITED (credited to the customer), RECORDED (the institution’s own account, final), RETURN_REQUESTED (TED Lerian cannot credit it) or MANUAL_REVIEW (waits for an operator; see reviewReason). It goes from RETURN_REQUESTED to RETURNED when it is returned. slaDeadlineAt is the 60-minute regulatory deadline from interbank settlement.
Authentication and permissions
Every call, except the public health probes, sends
Authorization: Bearer <token> issued by Access Manager. The default roles are editor (every operation), operator (every operation except the policy and ISPB binding writes) and viewer (reads, except the reconciliation reads).
Without the permission, or with a product license that is not valid for the organization:
403 TED-0071. Missing or invalid token: 401 TED-0070.
Conventions
- Tenant. Never from the path, query or body.
- Amounts. Decimal strings in BRL with two decimal places (
"1500.00"), never JSON numbers. - Dates. RFC 3339 in UTC (
2026-10-22T13:05:12Z); days asYYYY-MM-DD. The operating window uses the institution’s time zone (America/Sao_Paulo). - Idempotency. Every operation with an effect requires
X-Idempotency(1 to 128 ASCII characters; use a UUID). The same key with the same body returns the original response withX-Idempotency-Replayed: trueand no new effect. A different body returns422TED-0012. If the first request is still processing, you get409TED-0013(retry afterRetry-After). The replay lastsX-TTLseconds (default 300). OnPOST /v1/transfers, the key stays bound to the transfer it created. - Duplicate protection.
POST /v1/transferscan refuse with409TED-0014a materially identical request sent shortly after another one, even with a different key. Query the existing transfer. - Pagination. Lists return
items,limit,next_cursorandprev_cursor. Ask for up tolimit=100(default 20) and follownext_cursoruntil it isnull. The cursor is opaque. - Correlation. Send
X-Request-Id(UUID) or receive a generated one. It comes back in every response and identifies the call for support. - Events. Each transition is published as a CloudEvent with
ce-typestudio.lerian.br-ted.<resource>.<event>:transfer.*,incoming_transfer.*andincoming_return.*. Delivery is at least once; deduplicate byce-id. - Environments. The base URL is per installation (BYOC or Lerian Cloud), and Lerian provides it.
Errors
Every error is
application/problem+json (RFC 9457) with a stable code. Handle errors by code. errors lists the invalid fields of a 422.
A 503 means the request did not take effect: retry later with the same X-Idempotency. There are three exceptions:
TED-1000: the ledger did not confirm the result, and the operation can already be in the ledger. Read the status of the resource before you act again.TED-0080on a send: the transfer can already exist. Look for it withGET /v1/transfersbefore you send it again.TED-1010on a cancellation: the answer of the STR connector is unknown, and the cancellation request stays recorded. Retry with the sameX-Idempotencyand the samereason.
429 with Retry-After: handle it by status and wait that long before you retry.
On a send,
TED-0031, TED-1001, TED-1011 and TED-1013 never arrive as an error response. They arrive in rejection.code of a transfer in status REJECTED, in the 201 response or in a later query.
The error list gives each code with its cause and fix.
