Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt

Use this file to discover all available pages before exploring further.

Closure is a status transition on the bank account itself — there’s no dedicated /close endpoint. You PATCH the bank account with status: "CLOSED" and the sponsor bank either accepts the change or rejects it because something about the account makes closure unsafe. External bank accounts don’t go through this flow at all; the user disconnects them, which is covered alongside the linking flow.
PATCH /embedded-banking/v1/bank-accounts/{id}
Request
{
  "status": "CLOSED"
}
The same PATCH endpoint accepts nickname and bankAccountReference updates — closure is one possible field change among a few, not its own resource.

What can block closure

If the bank account isn’t in a state the sponsor bank will accept a closure for, the call returns a 400 with an errorCode identifying what’s wrong:
Error codeMeaning
BANK_ACCOUNT_NON_ZERO_BALANCEThe bank account still holds funds. Sweep the balance to another internal bank account or push it out via ACH, then retry.
BANK_ACCOUNT_CLOSURE_ERRORClosure failed for another reason — typically pending transactions, linked external bank accounts, or sponsor-bank hold. Read the error message body for specifics.
The call is idempotent. If the bank account is already CLOSED, the PATCH returns 200 OK with the current state and surfaces ALREADY_CLOSED_ERROR for visibility rather than erroring out.

After closure

Once status is CLOSED, the bank account is read-only. Reads return the final state, the closure timestamp on createdDateTime-adjacent fields, and any historical transactions remain queryable. accountNumber and routingNumber are retained for reconciliation but no longer accept transfers — ACH credits pushed to a closed bank account are returned by the sponsor bank with R02 (account closed). The bank account record itself isn’t deleted. It stays addressable by id indefinitely so that statements, transaction history, and audit trails remain reachable. The terminal ACCOUNT_STATUS_CHANGED webhook fires shortly after the PATCH with the new CLOSED status — subscribe to it if your downstream system needs to react to closure rather than poll for it.