Flow
Who can send a TED
You need permission to pay from the wallet:- on the organization’s main wallet, be an admin of the organization or of the realm;
- on another wallet, be one of those admins or have the wallet shared with you as
OWNERorUSER.
403 FORBIDDEN_WALLET. Any member of the organization can read and list TEDs.
Step 1: Create the TED
Send the amount in centavos, the beneficiary’s bank details increditParty, and in debitParty the name of the person making the transfer on your side.
Send
bankCode, branch and accountNumber as strings, so leading zeros are kept. Use default as {walletId} for the organization’s main wallet.
The TED is created as REQUESTED and nothing is sent yet. The bank details are not checked at this point — the bank checks them when you confirm. Keep the TED’s _id: it is the {tedId} of the next steps.
Step 2: Confirm the TED
Confirm it with the balance category of the wallet the amount is taken from.FLEX_INTERNATIONAL is the general-purpose one.
200 with the TED PAID: the bank accepted the transfer and the amount left the wallet. confirmedAmount, confirmedBalanceCategory and confirmedAt record it, external.tedId holds the bank’s identifier for the transfer, and the debit appears in the wallet’s transactions.
If the confirmation fails while sending — the balance category doesn’t cover the amount, a transaction limit is exceeded, or the bank refuses the beneficiary’s details — you get the error and the TED becomes FAILED. A FAILED TED can’t be confirmed again: create a new one. An error before anything is sent (the permission check, or the bank not answering while the wallet is read) leaves the TED REQUESTED; read it when in doubt.
The bank applies the wallet’s TED transaction limits when you confirm.
Reference: Confirm a TED payment
When the receiving bank returns the TED
APAID TED can still come back: when the receiving bank returns the transfer — for example because the account details don’t match an open account — the amount is credited back to the wallet and the TED becomes REFUNDED, with the time in refundedAt. A FAILED TED whose confirmation timed out after the bank had already taken it can end REFUNDED the same way.
Cancel a TED
A TED that is stillREQUESTED can be cancelled — it becomes CANCELLED and nothing is sent. Send no body:
204. A TED in any other status — including one already CANCELLED — answers 409 TED_STATUS_IS_NOT_PENDING.
Follow a TED
Read the TED to see itsstatus, or list the TEDs of a wallet, an account, an organization or your realm — newest first, filtered by status (for example ?status=PAID,REFUNDED) and paged with limit + next. Send the same x-environment you created the TED in. There is no webhook for TEDs.
Common errors
Errors come in the error envelope with a stablecode. When the bank refuses a transfer for a reason without a code of its own in this API, code carries the bank’s reason in lower case and message the bank’s explanation — or Unknown error when it gave none. Branch on code, not on the message.
Each endpoint’s reference page lists every error it can return.
Next steps
Send a Pix payment
Pay by Pix key, QR code or bank details.
Wallets for your customers
Read balances and transaction limits, and move money between wallets.