> ## 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.

# Send (TED OUT)

> Send TED transfers to any Brazilian bank with a two-step initiate-and-confirm flow — fee preview, same-day settlement, and BACEN compliance.

TED OUT lets your customers send money to any account at any Brazilian bank. The two-step flow, initiate then confirm, lets the customer review the fee before the system commits the transfer.

## How it works for your customer

***

**Step 1 — Enter details and review fee**
The customer provides the recipient's bank details and the amount. The system calculates the fee and returns the total cost before it debits anything. The customer sees exactly what they will pay.

**Step 2 — Confirm and send**
After the customer confirms, the system debits the funds (amount + fee) from their account. It submits the transfer through JD's SPB gateway to the BACEN network and issues a confirmation number at once.

## Prerequisites

***

Before you initiate a transfer:

* The sender must have a registered account in CRM.
* The sender's balance must cover the transfer amount plus the applicable fee.
* You must request the transfer on a business day, between 06:30 and 17:00 (Brasília time).

## Step 1: Initiate the transfer

***

The customer submits the recipient's details and the amount. The system validates the request, calculates the fee, and creates a transfer intent valid for 24 hours. The system moves no funds at this stage.

See the full request specification in the [Initiate Transfer](/en/reference/midaz/plugins/ted/initiate-transfer) reference.

**Endpoint:** POST /v1/transfers/initiate

**Response (key fields):**

```json theme={null}
{
  "initiationId": "019c96a0-aa10-7abc-d1e2-8c9d0e1f2a3b",
  "feeAmount": 1.50,
  "totalAmount": 1001.50,
  "status": "PENDING_CONFIRMATION",
  "expiresAt": "2026-02-06T15:30:00-03:00"
}
```

<Note>
  **Fee direction (cash-out):** For TED OUT and P2P transfers, the plugin adds the fee on top of the transfer amount, so `totalAmount = amount + feeAmount`. The plugin debits the sender's account for the full total. TED IN works the other way and deducts the fee from the received amount.
</Note>

<Warning>
  The transfer intent expires 24 hours after initiation. If the customer does not confirm within that window, create a new initiation.
</Warning>

## Step 2: Confirm the transfer

***

After the customer reviews the fee and confirms, submit the `initiationId` to process the transfer. The system provisions the funds and sends the payment to the BACEN network.

Most integrations process the transfer with only the `initiationId`. Some tenants sign TED OUT payloads outside the plugin. These tenants first call `POST /v1/transfers/signing/prepare`. They then send `signingArtifactId`, `payloadHash`, and `signature` with the same `initiationId`.

See the full request specification in the [Process Transfer](/en/reference/midaz/plugins/ted/process-transfer) reference.

**Endpoint:** POST /v1/transfers/process

**Response (key fields):**

```json theme={null}
{
  "transferId": "019c96a0-ab10-7cde-f1a2-0e1f2a3b4c5d",
  "confirmationNumber": "20260205001",
  "status": "PROCESSING",
  "feeAmount": 1.50,
  "totalAmount": 1001.50
}
```

## Settlement timeline

***

<Steps>
  <Step title="Submitted">
    The system provisions the funds and sends the transfer to the BACEN network. Status: `PROCESSING`.
  </Step>

  <Step title="Settled">
    The destination bank confirms settlement. Status: `COMPLETED`.
  </Step>

  <Step title="Customer notified">
    The plugin dispatches a `transfer.completed` webhook to your system.
  </Step>
</Steps>

TED settles same-day (D+0) for transfers submitted before 17:00 Brasília time.

## Operating hours

***

<Warning>
  Request TED transfers only on business days, 06:30–17:00 (Brasília, UTC-3, by default). The plugin rejects any transfer outside this window at once and moves no funds. It also rejects BACEN bank holidays. The error response gives the next available time.
</Warning>

## Error handling

***

The plugin always accounts for your customer's money when something goes wrong:

<AccordionGroup>
  <Accordion title="Transfer rejected by the destination bank">
    The receiving institution declines the transfer. The plugin releases the provisioned funds at once and returns the full amount, including the fee, to the sender's balance. Status: `REJECTED`. The plugin sends a `transfer.rejected` webhook.
  </Accordion>

  <Accordion title="Temporary network issue">
    The plugin retries automatically, up to three attempts by default. If the outcome stays unknown after retries — a 5xx or a timeout from JD SPB — the plugin does not auto-revert the transfer. It preserves the hold and hands the transfer to the reconciliation worker, which resolves it against the ledger. If reconciliation runs out of attempts, the plugin flags the transfer for manual operator review (`MANUAL_REVIEW`). The plugin never loses the funds, but resolution may take time. A clear 4xx rejection differs: it reverts the hold at once (see the rejected case above).
  </Accordion>

  <Accordion title="Return from the destination bank">
    The destination bank can return the funds after settlement, for example on account closure or a regulatory hold. The plugin reverses the amount in your ledger as a separate transaction. This return sits outside the transfer lifecycle. The original transfer record stays `COMPLETED`, and the plugin creates a new reversal record.
  </Accordion>
</AccordionGroup>

<Note>
  Every mutating transfer request must include an `X-Idempotency` header (max 255 characters). Reuse the same key when you retry a request to avoid duplicate submissions. See [Retries and idempotency](/en/reference/retries-idempotency) for details.
</Note>

For a full list of error codes, see the [TED error reference](/en/reference/midaz/plugins/ted/ted-error-list).

## Check transfer status

***

Track the progress of a transfer at any time.

**Endpoint:** [GET /v1/transfers/{transferId}](/en/reference/midaz/plugins/ted/retrieve-transfer)

**Response (key fields):**

```json theme={null}
{
  "transferId": "019c96a0-ab10-7cde-f1a2-0e1f2a3b4c5d",
  "confirmationNumber": "20260205001",
  "senderAccountId": "019c96a0-a910-7abc-d1e2-8c9d0e1f2a3b",
  "type": "TED_OUT",
  "status": "COMPLETED",
  "amount": 1000.00,
  "feeAmount": 1.50,
  "totalAmount": 1001.50,
  "createdAt": "2026-02-05T15:30:00-03:00",
  "completedAt": "2026-02-05T15:35:12-03:00"
}
```

## Cancel a transfer

***

You can cancel a transfer while it is in `CREATED` or `PENDING` status, before the plugin submits it to the network.

**Endpoint:** [POST /v1/transfers/{transferId}/cancel](/en/reference/midaz/plugins/ted/cancel-transfer)

<Warning>
  You cannot cancel a transfer in `PROCESSING` or a later state. After the plugin submits it to the BACEN network, the transfer must complete or fail before any reversal.
</Warning>

## Common ISPB codes

***

*Last verified: 2026-02-06. Values are subject to change.*

| Bank            | ISPB     |
| --------------- | -------- |
| Banco do Brasil | 00000000 |
| Bradesco        | 60746948 |
| Itaú            | 60701190 |
| Santander       | 90400888 |
| Caixa Econômica | 00360305 |
| Nubank          | 18236120 |
| Inter           | 00416968 |

For a complete list, consult the [ISPB directory](https://www.bcb.gov.br/pom/spb/estatistica/port/AODO.asp) on the Central Bank website.
