Events to check account status

Listen to Asaas events to keep your integration up to date.

Use registration status events to automatically track changes to an account's commercial information, bank account, documentation and general approval.

Each notification indicates the change in event and the current registration status in the accountStatus object.

Available events

Bank account

EventWhen it occurs
ACCOUNT_STATUS_BANK_ACCOUNT_INFO_APPROVEDThe bank account is approved.
ACCOUNT_STATUS_BANK_ACCOUNT_INFO_AWAITING_APPROVALThe bank account is under review.
ACCOUNT_STATUS_BANK_ACCOUNT_INFO_PENDINGThe bank account returns to pending.
ACCOUNT_STATUS_BANK_ACCOUNT_INFO_REJECTEDThe bank account is rejected.

Commercial information

EventWhen it occurs
ACCOUNT_STATUS_COMMERCIAL_INFO_APPROVEDThe commercial information is approved.
ACCOUNT_STATUS_COMMERCIAL_INFO_AWAITING_APPROVALThe commercial information is under review.
ACCOUNT_STATUS_COMMERCIAL_INFO_PENDINGThe commercial information returns to pending.
ACCOUNT_STATUS_COMMERCIAL_INFO_REJECTEDThe commercial information is rejected.

Documentation

EventWhen it occurs
ACCOUNT_STATUS_DOCUMENT_APPROVEDThe documents are approved.
ACCOUNT_STATUS_DOCUMENT_AWAITING_APPROVALThe documents are under review.
ACCOUNT_STATUS_DOCUMENT_PENDINGThe documents return to pending.
ACCOUNT_STATUS_DOCUMENT_REJECTEDThe documents are rejected.

General approval

EventWhen it occurs
ACCOUNT_STATUS_GENERAL_APPROVAL_APPROVEDThe account is approved.
ACCOUNT_STATUS_GENERAL_APPROVAL_AWAITING_APPROVALThe account is under review.
ACCOUNT_STATUS_GENERAL_APPROVAL_PENDINGThe account returns to pending.
ACCOUNT_STATUS_GENERAL_APPROVAL_REJECTEDThe account is rejected.

When accountStatus.general is APPROVED, the account's general approval is complete.

Annual confirmation of commercial data

For subaccounts subject to annual confirmation, the following may also be sent:

EventWhen it occurs
ACCOUNT_STATUS_COMMERCIAL_INFO_EXPIRING_SOONThe commercial data is close to expiring.
ACCOUNT_STATUS_COMMERCIAL_INFO_EXPIREDThe commercial data expired without confirmation or update.

ACCOUNT_STATUS_COMMERCIAL_INFO_EXPIRING_SOON is sent before the expiration date so that the integration can request confirmation or update of the data.

When you receive ACCOUNT_STATUS_COMMERCIAL_INFO_EXPIRED, handle the pending item even if accountStatus.commercialInfo and accountStatus.general are still APPROVED. The annual expiration is controlled separately from the registration approval.

See the complete flow in Annual Confirmation of Commercial Data for Subaccounts.

Event payload

The notification is sent via POST with the event and the current account status.

{
    "id": "evt_05b708f961d739ea7eba7e4db318f621&368604920",
    "event": "ACCOUNT_STATUS_COMMERCIAL_INFO_APPROVED",
    "dateCreated": "2024-06-12 16:45:03",
    "account": {
        "id": "47ed0d25-f9fb-4b35-b23a-d8895caf92b7",
        "ownerId": null
    },
    "accountStatus": {
        "id": "175027c1-029c-41e5-8b9a-e289b9788c33",
        "commercialInfo": "APPROVED",
        "bankAccountInfo": "APPROVED",
        "documentation": "APPROVED",
        "general": "APPROVED"
    }
}

Important payload fields

FieldDescription
idUnique identifier of the event. Use it for idempotence.
eventIdentifies the change received.
account.idIdentifier of the account related to the event.
accountStatus.idRegistration status identifier.
accountStatus.commercialInfoStatus of the commercial information.
accountStatus.bankAccountInfoStatus of the bank account.
accountStatus.documentationStatus of the documents.
accountStatus.generalGeneral approval status of the account.
👍

Webhook response with types and ENUMs

If you want to know the type of each field and the available ENUM values, check the 200 response of the "Check account registration status" endpoint in the documentation.

How to handle the events

When receiving a registration status event:

  1. identify the change through the event field;
  2. persist the id to prevent duplicate processing;
  3. use account.id to identify the account in your system;
  4. update the corresponding dimension using the accountStatus data;
  5. respond HTTP 200 after confirming persistence;
  6. process additional rules asynchronously.

Webhooks follow the at least once model, so the same event may be sent more than once.

See how to implement idempotence in Webhooks.

To track registration changes, prefer these events instead of continuously querying the account status through the API. Use the individual query when you need to retrieve the current state on demand.

🚧

Attention

  • As new products and features are added to Asaas, new attributes may be included in the Webhook. It is very important that your code is prepared not to throw exceptions if Asaas returns new attributes that your application does not handle, as this may interrupt the sync queue.
  • We will send an email and announce on our Discord when new fields are added to the Webhook. The email will be sent to the notification email address defined in the Webhook settings.

Next steps


Did this page help you?