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 payment links, specifically allowing you to update existing payment links. It is useful for scenarios where you need to modify details of a payment link such as its name, description, billing type, charge type, value, due date, subscription cycle, and other settings after it has been created.

Practical examples include:

  • Changing the payment amount or billing type on an existing payment link.
  • Updating the subscription cycle or end date for recurring payment links.
  • Activating or deactivating a payment link.
  • Adjusting notification preferences for email alerts related to the payment link.

Properties

Name Meaning
Nome * The name of the payment link.
Descrição A description of the payment link.
Tipo De Cobrança * Accepted payment methods on the link. Options: Boleto Bancário (bank slip), Cartão De Crédito (credit card), PIX, Indefinido (customer chooses).
Tipo De Valor * Type of charge for the link. Options: Valor Fixo (fixed value), Valor Recorrente (recurring value/subscription), Valor Livre (customer defines the value).
Valor * The amount to be charged in Brazilian reais. Required if charge type is fixed or recurring.
Data De Vencimento Due date of the charge (optional, only for fixed value charge type).
Ciclo De Cobrança * Billing frequency for subscriptions. Options: Anual (yearly), Bimestral (bimonthly), Mensal (monthly), Quinzenal (biweekly), Semanal (weekly), Semestral (semiannually), Trimestral (quarterly). Only for recurring charge type.
Data De Término End date of the subscription (optional, only for recurring charge type).
Máximo De Cobranças Maximum number of installments (1 to 12). Only for fixed value charge type.
Notificar Por Email Whether to send email notifications related to the payment link.
Ativo Whether the payment link is active.
ID Do Link * Unique identifier of the payment link to update.

Output

The node outputs JSON data representing the updated payment link object returned by the Asaas API. This includes all relevant fields reflecting the current state of the payment link after the update operation.

No binary data output is involved.

Dependencies

  • Requires an API key credential for authenticating with the Asaas API.
  • The node uses the Asaas API base URL, which switches between sandbox and production environments based on credential configuration.
  • No additional external dependencies are required beyond the Asaas API access.

Troubleshooting

  • Common issues:

    • Invalid or missing payment link ID will cause errors since the update requires a valid existing link.
    • Providing inconsistent or invalid combinations of properties (e.g., setting a due date for a recurring charge type) may result in API errors.
    • Network or authentication failures can occur if the API key is incorrect or the environment is misconfigured.
  • Error messages:

    • Errors from the Asaas API typically indicate what field or parameter caused the failure. For example, "Invalid paymentLinkId" means the provided ID does not exist.
    • If the node package is removed from npm or unavailable, the node throws an error instructing to remove the node from the installation.
  • Resolution tips:

    • Verify that the payment link ID is correct and exists in your Asaas account.
    • Ensure that required fields marked with * are provided.
    • Match the charge type with appropriate fields (e.g., do not set dueDate for recurring charges).
    • Check API key validity and environment settings in credentials.

Links and References

Discussion