Square icon

Square

Consume Square API

Overview

This node integrates with the Square API to manage customers, bookings, and invoices. Specifically, for the Customer - Create operation, it allows users to create a new customer record in their Square account by providing essential details such as the given name and optional additional information like address, birthday, company name, email, family name, nickname, notes, phone number, and reference ID.

This node is beneficial in scenarios where businesses want to automate customer management workflows, such as adding new customers from form submissions, CRM systems, or other data sources directly into Square without manual entry.

Practical example:
A retail business collects customer information via an online signup form and uses this node to automatically add each new customer to their Square customer database, including contact details and addresses for marketing and order fulfillment purposes.

Properties

Name Meaning
Given Name The customer's first name (required).
Additional Fields Optional extra customer details:
- Address Customer's address details including: Address Line 1, Address Line 2, City, State, Postal Code, Country (two-letter ISO code).
- Birthday Customer's birthday in YYYY-MM-DD or MM-DD format.
- Company Name The company name associated with the customer.
- Email Address Customer's email address.
- Family Name Customer's last name.
- Nickname A nickname for the customer.
- Note Any note about the customer.
- Phone Number Customer's phone number.
- Reference ID A custom reference ID for the customer.

Output

The node outputs JSON data representing the newly created customer object as returned by the Square API. This typically includes the customer's unique ID, provided names, contact details, and any additional fields submitted.

No binary data output is involved in this operation.

Dependencies

  • Requires an active Square account with API access.
  • Needs an API authentication token credential configured in n8n to authorize requests to the Square API.
  • The node dynamically selects the base URL depending on whether the environment is set to "sandbox" or production.

Troubleshooting

  • Common issues:
    • Missing required fields such as "Given Name" will cause the API request to fail.
    • Invalid country codes in the address may result in errors.
    • Network or authentication failures if the API key is invalid or missing.
  • Error messages:
    • Errors returned from the Square API are propagated; for example, validation errors will include descriptive messages.
    • If the node is set to continue on failure, error details are included in the output JSON for each failed item.
  • Resolutions:
    • Ensure all required fields are filled correctly.
    • Validate country codes against ISO 3166-1 alpha-2 standards.
    • Verify that the API key credential is properly configured and has necessary permissions.

Links and References

Discussion