Square icon

Square

Consume Square API

Overview

This node integrates with the Square API to manage invoices, specifically allowing users to create new invoices associated with a given location. It is useful in scenarios where businesses want to automate invoice generation within their workflows, such as after a sale or service completion. For example, a retail store could automatically generate an invoice for a customer purchase, including payment requests and recipient details.

Properties

Name Meaning
Location ID The identifier of the location that the invoice is linked to (required).
Additional Fields Optional extra data for the invoice, including:
- Description: Text describing the invoice.
- Invoice Number: A unique string identifying the invoice.
- Payment Requests: One or more payment requests specifying request type (only "Balance" supported), due date, and whether tipping is enabled.
- Primary Recipient: Details about the main recipient, currently supporting Customer ID.
- Title: The title of the invoice.

Output

The node outputs JSON data representing the created invoice object returned by the Square API. This includes all invoice details such as IDs, status, payment requests, recipients, and metadata. There is no binary output.

Dependencies

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

Troubleshooting

  • Missing Required Fields: If the "Location ID" is not provided, the API call will fail. Ensure this field is set.
  • Invalid Payment Request Data: Only the "Balance" request type is supported; using other types may cause errors.
  • API Authentication Errors: Verify that the API key credential is correctly configured and has appropriate permissions.
  • Empty Additional Fields: While optional, if you provide update fields, ensure they are valid according to the Square API schema.
  • Error Handling: If the API returns an error, the node can either stop execution or continue depending on the "Continue On Fail" setting.

Links and References

Discussion