Asaas icon

Asaas

Integração com a API do Asaas para pagamentos e cobranças

Overview

This node integrates with the Asaas API to manage anticipation (early withdrawal) of receivables. Specifically, the Simular operation under the Antecipação resource allows users to simulate an anticipation scenario based on selected payments and anticipation type before actually requesting it.

Typical use cases include:

  • Businesses wanting to estimate the amount they would receive if they anticipate certain payments.
  • Financial teams simulating manual or automatic anticipation scenarios to optimize cash flow.
  • Testing different anticipation types and amounts without committing to a real transaction.

For example, a user can input a list of payment IDs and choose between automatic or manual anticipation to see the expected results, helping them decide whether to proceed with the actual anticipation request.

Properties

Name Meaning
Cobranças * IDs of the payments to be anticipated. Can be a comma-separated string or a JSON array of IDs.
Tipo De Antecipação Type of anticipation:
- Automática (Automatic): Anticipation based on historical data.
- Manual: Specific selection with a defined total value.
Valor Total Total amount to anticipate (only applicable for manual anticipation). Must be a positive number.

Output

The output is a JSON object representing the simulation result returned by the Asaas API. It contains details about the anticipated amounts, fees, and other relevant financial information based on the provided payments and anticipation type.

No binary data is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Asaas API.
  • The node uses the Asaas API endpoint /anticipations/simulate via a POST request.
  • The environment (sandbox or production) is determined by the credential configuration.
  • No additional external dependencies beyond the Asaas API are required.

Troubleshooting

  • Invalid Payment IDs: If the payments property contains invalid or malformed IDs, the API may return errors. Ensure IDs are correctly formatted as either a JSON array or a comma-separated string.
  • Missing Required Fields: The payments field is mandatory. Omitting it will cause the node to fail.
  • Manual Anticipation Without Total Value: When using manual anticipation, the totalValue must be greater than zero; otherwise, the API might reject the request.
  • API Authentication Errors: Ensure the API key credential is valid and has appropriate permissions.
  • Package Availability: The node checks if its npm package is available. If removed, it throws an error instructing to remove the node from the installation.

Links and References

Discussion