Closing non-BaaS subaccounts

Asaas allows the parent account to close its non-BaaS subaccounts directly through the API.

This feature is useful for partners who need to close subaccounts that were created incorrectly or will not be used.

Prerequisites

Before using the closure endpoint, two prerequisites must be met by the parent account:

  1. IP Whitelist configured: the parent account must have at least one authorized IP address registered under Integrations. Requests made from unauthorized IP addresses will be rejected.
  2. Closure management enabled: subaccount closure through the API is disabled by default and must be enabled manually.

Enabling closure management

Because this is an irreversible operation, the feature requires explicit activation and confirmation using an authentication token.

To enable closure management:

  1. Access the Integrations menu.
  2. Access the Security option.
  3. Locate the Validation of subaccount closure through the API panel.
  4. Click Enable closure.
  5. Confirm the action using the token sent to the authorized device.
📘

Important

The Validation of subaccount closure through the API panel is not displayed for customers who operate with Asaas BaaS. BaaS subaccount closure is carried out through a separate process.

To disable the feature at any time, click Disable closure in the same panel and confirm the action using the authentication token.

Conditions for closing a subaccount

For the closure to be accepted, the subaccount must meet all the criteria below:

  • the provided id must belong to a subaccount of the parent account making the request;
  • not operate as BaaS;
  • have never logged in;
  • have been created less than 48 hours ago;
  • not be closed.

Closing the subaccount

With the feature enabled, the parent account can close the subaccount through the Close non-BaaS subaccount endpoint.

Attention

Closure is irreversible. After closing a subaccount, it will not be possible to reactivate it.

A new subaccount may be created in the future using the same data or similar information.



Did this page help you?