Actions19
- Customer Actions
- Subscription Actions
- Invoice Actions
Overview
The "Bill a Customer" operation in the Invoice resource of this node interacts with the ProAbono API to generate an invoice for a specified customer based on their balance lines within a given date range. This operation is useful for automating billing processes, ensuring customers are invoiced accurately according to their usage or subscriptions.
Common scenarios include:
- Automatically generating invoices for customers at the end of a billing cycle.
- Billing only customers who have valid payment information on file.
- Adding custom notes to invoices for reference or internal tracking.
- Controlling whether invoices should be processed online or forced offline (e.g., for manual payment handling).
Practical example:
A subscription-based service can use this operation to bill customers monthly by specifying the start and end dates for the billing period, optionally adding a purchase order note, and choosing to bill only those customers with valid payment methods.
Properties
Name | Meaning |
---|---|
Reference Customer | The unique identifier used within your own application for this customer. |
Note | A note added to the bottom of the invoice PDF, just above the Customer Service Section. Useful for including purchase orders or special instructions. |
Only if Customer Has Valid Payment Information? | Option to bill only if the customer has valid payment information ("Yes") or to bill regardless of payment info status ("No"). |
Force Offline? | Whether to force the invoice to be offline even if the customer has automated payment methods like card or direct debit. |
Start Date (Include Lines After) | Include only balance lines dated on or after this date; earlier lines will be ignored. |
End Date (Include Lines Before) | Include only balance lines dated on or before this date; later lines will be ignored. |
Output
The node outputs JSON data representing the result of the billing operation from the ProAbono API. This typically includes details about the created invoice such as invoice ID, status, amounts, and any relevant metadata returned by the API.
If the API supports binary data output (e.g., PDF invoice files), the node would handle that accordingly, but based on the provided code and properties, the primary output is structured JSON data describing the invoice.
Dependencies
- Requires an active connection to the ProAbono API.
- Needs credentials including a business identifier, an agent key, and an API key for authentication.
- The base URL for API requests is dynamically constructed using the business ID credential.
- Proper configuration of these credentials in n8n is necessary for successful operation.
Troubleshooting
- Invalid Customer Identifier: If the Reference Customer ID does not exist or is incorrect, the API may return an error indicating the customer was not found. Verify the customer ID before running the node.
- Missing or Invalid Credentials: Authentication errors occur if the API keys or business ID are missing or invalid. Ensure credentials are correctly set up in n8n.
- Date Range Issues: Providing an invalid date range (e.g., start date after end date) might cause no balance lines to be included or API errors. Validate date inputs.
- Billing Without Payment Info: If "Only if Customer Has Valid Payment Information?" is set to yes but the customer lacks valid payment info, no invoice will be generated. Consider setting this option appropriately.
- Force Offline Conflicts: Forcing offline billing when the customer has automated payments might lead to unexpected behavior; understand your billing workflow before enabling this.
Links and References
- ProAbono API Documentation (general reference for API endpoints and parameters)
- n8n Documentation for configuring credentials and using HTTP request nodes if needed for custom extensions