Actions29
- Cliente Actions
- Antecipação Actions
- Assinatura Actions
- Cobrança Actions
- Link De Pagamento Actions
- Webhook Actions
Overview
This node integrates with the Asaas API to create a new payment charge ("Cobrança") for a customer. It supports multiple billing types such as bank slip (boleto bancário), credit card, debit card, PIX, deposit, and bank transfer. The node is useful in automating invoicing and payment collection workflows by programmatically generating charges with detailed configurations like due date, installment options, discounts, and late fees.
Practical examples:
- Automatically generate a boleto bancário charge for a customer with a specific due date and optional late fees.
- Create a credit card charge with installment payments and card details.
- Generate a PIX charge with QR code expiration settings.
- Apply discounts or external references to track charges in your system.
Properties
| Name | Meaning |
|---|---|
| Cliente * | Select or enter the customer ID to whom the charge will be issued. Must be a valid customer identifier (e.g., starting with "cus_"). |
| Tipo De Cobrança * | Billing type / payment method of the charge. Options: Boleto Bancário, Cartão De Crédito, Cartão De Débito, Depósito Em Conta, Indefinido (Cliente Escolhe), PIX, Transferência Bancária. |
| Valor * | Amount of the charge in Brazilian reais (R$). Minimum 0.01. |
| Data De Vencimento * | Due date of the charge. |
| Descrição | Optional description text for the charge. |
| Referência Externa | Free text field for external reference or identification of the charge in your own system. |
| Número De Parcelas | Number of installments (1 to 12) — only applicable if billing type is Credit Card. |
| Valor Da Parcela | Value of each installment; if set to 0, it will be calculated automatically — only for Credit Card billing type. |
| Juros Por Atraso (%) | Monthly interest rate percentage applied on late payments (max 2%) — applicable for Boleto, PIX, Transfer, Deposit billing types. |
| Multa Por Atraso (%) | Late fee percentage applied on late payments (max 10%) — applicable for Boleto, PIX, Transfer, Deposit billing types. |
| Desconto | Collection of discount options: - Valor Do Desconto: Discount amount in reais. - Dias Para Desconto: Number of days before due date to apply discount. - Tipo De Desconto: Fixed value or Percentage. |
| Dados Do Cartão | Collection of credit/debit card data required when billing type is Credit Card or Debit Card: - Ano De Expiração (YYYY) - Código De Segurança (CVV) - Mês De Expiração (MM) - Nome No Cartão - Número Do Cartão |
| Configurações PIX | Collection of PIX-specific settings: - Expiração Do QR Code (Minutos): QR code expiration time in minutes (15 to 2880). |
Output
The node outputs JSON data representing the created payment charge as returned by the Asaas API. This includes all relevant details of the charge such as its ID, status, customer info, billing type, amounts, due dates, discounts, fines, and any split commission configuration applied.
No binary data output is produced by this operation.
Example output JSON structure (simplified):
{
"id": "pay_000012345678",
"customer": "cus_000005219613",
"billingType": "BOLETO",
"value": 150.00,
"dueDate": "2024-07-31",
"description": "Monthly subscription fee",
"status": "PENDING",
"discount": {
"value": 10.00,
"type": "FIXED",
"dueDateLimitDays": 5
},
"interest": {
"value": 1.5
},
"fine": {
"value": 2.0
},
"externalReference": "INV-202406"
}
Dependencies
- Requires an API key credential for authenticating with the Asaas API.
- The node uses the Asaas REST API endpoints, switching between sandbox and production URLs based on credential environment setting.
- The node depends on internal helper functions to make HTTP requests to Asaas.
- For customer selection, it loads customers via API calls supporting search and pagination.
Troubleshooting
- Invalid Customer ID: If the "Cliente" field is empty or does not start with "cus_", the node throws an error indicating the customer ID must be valid. Ensure you provide a correct customer identifier.
- API Request Failures: Network issues or invalid API keys can cause request failures. Verify your API key credential and network connectivity.
- Unsupported Billing Type Combinations: Some properties are only valid for certain billing types (e.g., installments only for credit cards). Using them incorrectly may cause errors.
- Package Removed from npm: The node checks if its package is still available on npm. If removed, it throws an error advising to remove the node from your installation.
- Validation Errors: Fields like discount percentages, interest rates, and fines have maximum allowed values. Exceeding these limits will cause errors.