Closing an Account
This page explains how to request the closing of an account with the CloseAccount method, which conditions must be met and how to track the progress. Creating the request does not close the account: it is only considered closed after the final return. The fields of the method are described below and in the API Reference.
Before requesting the closing
The closing is only completed if these conditions are met:
- The end customer agreed to the Closing Terms.
- The account has no available or pending balance. The customer must withdraw the balance, by TED or PIX.
- There are no open debts.
- There are no scheduled or in-process transactions that prevent the closing. Cancel the scheduled future payments before calling the method.
How it works
When the request is approved, the effect is immediate and all the transactions of the account are blocked. Fits answers within 48 business hours, with an internal security review, as long as the conditions are met.
flowchart TD
A["The BU calls CloseAccount"] --> B["Request created (0 Created)"]
B --> C["Fits analyzes the conditions and runs the security review"]
C --> D["Processing (1 Processing)"]
D --> E{"Final return"}
E -- "5 Approved" --> F["Account closed"]
E -- "4 Disapproved" --> G["Account remains active"]
E -- "2 Error or 3 Pending" --> H["The BU resolves the condition or contacts support"]
I["Fits requests the automatic closing (6 AutomaticClosingRequest)"] --> C
Request fields
In the Requirement column, Mandatory means the field must be sent; Optional, that it can be left out; Conditional, that it depends on another field, as described.
| Field | Requirement | Description |
|---|---|---|
| Method | Mandatory | Name of the method (CloseAccount). |
| PartnerId | Mandatory | Information provided by Fits. |
| BusinessUnitId | Mandatory | Information provided by Fits. |
| TaxNumber | Mandatory | CPF or CNPJ of the account holder. Characters that are not digits are removed. |
| AccountKeys | Conditional | Keys of the accounts to be closed, including Locker accounts. Required if Accounts is not sent; if it has at least one item, Accounts is ignored. |
| Accounts | Conditional | Internal bank data of each account, in an object with Bank, BankBranch, BankAccount and BankAccountDigit (all text). Required if AccountKeys is not sent. |
| Justification | Mandatory | Reason for the closing, in free text. There is no list of values. |
Provide AccountKeys or Accounts. If AccountKeys has at least one item, the method uses only that list and ignores Accounts. If neither is provided, the call returns an error. Null items in the lists are ignored.
Response fields
| Field | Description |
|---|---|
| Success | "true" or "false", as text. |
| Message | Success or error message. |
| Validation | Only on error: validation details. |
| Sucess | Only in the internal errors of CloseAccount: carries the status in place of Success, spelled with a single "c". |
On success, the response returns Success and Message. On error, it returns Message and Validation (a list of texts with the details), and, in the internal errors of CloseAccount, the status key comes written as Sucess (with a single "c"), as text; in general errors the field is Success, as in the Error Catalogue. The success message is in the Success Catalogue, and the errors are in the Error Catalogue.
How to track the result
A successful API response only confirms that the request was received. The progress arrives through the UpdateCloseAccount webhook, with the CloseAccountInformationStatus field and a message for the end customer. The fields of the webhook are in Webhooks.
| Value | Status | Meaning and what the BU must do |
|---|---|---|
| 0 | Created | The request was registered. Wait for the next statuses. |
| 1 | Processing | Fits is processing the request. Wait. |
| 2 | Error | There was a failure in processing. The webhook message explains the reason. The BU must resolve the condition or contact Fits support, and must not consider the account closed. |
| 3 | Pending | There is a pending item that prevents the closing, such as a balance or a scheduled transaction. The webhook message explains the reason. The BU must resolve the pending item or contact Fits support, and must not consider the account closed. |
| 4 | Disapproved | The request was disapproved and the account remains active. |
| 5 | Approved | The account was closed. It is the only status in which the BU must consider the account closed. |
| 6 | AutomaticClosingRequest | The closing was requested automatically by Fits. Wait for the next statuses. |
The values of CloseAccountInformationStatus are listed in the Code Mapping, in the section Closure status.
Not all these values generate notifications or are recorded by the flows. Therefore, consider the account closed only when you receive status 5 (Approved). The response of CloseAccount only carries Success and Message, with no closing status. When the account is closed, the account type (Account.Type) changes to Closed (26), without generating the UpdateAccount webhook.
Locker accounts
CloseAccount also accepts Locker accounts, identified by AccountKeys. To close the regular account, first close all its Locker accounts. The balance of a Locker account is validated in the call: with a remaining balance, the closing is refused. The balance of a regular account is handled after the call. Closing a Locker account does not generate the UpdateCloseAccount webhook.
CloseAccount errors
The errors returned by this method are listed in the Error Catalogue, in the section CloseAccount.
Closing by Fits
Fits also closes accounts on its own. An account disapproved in the analysis and not yet closed may also be closed automatically, and the customer can try to open the account again after 72 hours. Closings of Locker accounts and those made directly by the Fits back-office do not generate the UpdateCloseAccount webhook.
How to handle the closing
- Confirm that the closing conditions are met before calling the method.
- Store the USN and relate it to the original request, together with the TaxNumber, the account, the method, the payload, the response and the webhooks.
- Consider the account closed only in status 5 (Approved).
- If the status is 2 (Error) or 3 (Pending), read the message, resolve the condition and make a new request, or contact Fits support.
- Periodically reconcile the requests that stayed without a final return.
Updated 11 days ago

