Actions12
Overview
This node integrates with the Square API to manage invoices, specifically allowing users to update existing invoices. It is useful in scenarios where invoice details need to be modified after creation, such as correcting invoice descriptions, changing invoice numbers, adjusting payment requests, or updating titles.
For example, a business might use this node to update an invoice's due date or enable tipping on a payment request after sending it to a customer. This ensures that invoice data remains accurate and up-to-date without manual intervention in the Square dashboard.
Properties
| Name | Meaning |
|---|---|
| Invoice ID | The unique identifier of the invoice to update. |
| Version | The current version number of the invoice; required for concurrency control when updating. |
| Update Fields | A collection of fields to update on the invoice: |
| - Description | Text description of the invoice. |
| - Invoice Number | Custom invoice number string. |
| - Payment Requests | One or more payment requests associated with the invoice. Each includes: |
| Request Type | Type of payment request (currently only "Balance" supported). |
| Due Date | Due date for the payment request. |
| Tipping Enabled | Boolean flag to enable or disable tipping on the payment request. |
| - Title | Title of the invoice. |
Output
The node outputs JSON data representing the updated invoice object returned by the Square API. This JSON includes all invoice details after the update operation, reflecting any changes made.
No binary data output is produced by this node.
Dependencies
- Requires an active connection to the Square API.
- Needs an API authentication token configured in n8n credentials to authorize requests.
- The base URL switches between sandbox and production environments based on credential settings.
Troubleshooting
Error: "Please enter at least one field to update for the invoice"
Occurs if no update fields are provided. To fix, ensure at least one property under "Update Fields" is set before executing.Version Mismatch Errors
The Square API requires the correct invoice version number to prevent conflicting updates. Make sure to provide the current version of the invoice when updating.API Authentication Failures
If the API key or token is invalid or missing, requests will fail. Verify that the API credentials are correctly configured in n8n.Network or Permission Issues
Ensure that the environment allows outbound HTTPS requests to Square endpoints and that the API key has sufficient permissions to update invoices.