Square icon

Square

Consume the Square API

Overview

This node integrates with the Square API to manage customer data. Specifically, the "Get" operation under the "Customer" resource retrieves detailed information about a single customer by their unique Customer ID.

Common scenarios where this node is beneficial include:

  • Fetching customer details for order processing or support.
  • Synchronizing customer data between Square and other systems.
  • Verifying customer existence before performing further actions.

For example, you might use this node to retrieve a customer's profile before sending them a personalized email or updating their records in a CRM system.

Properties

Name Meaning
Customer ID The unique identifier of the customer to retrieve. This is required to specify which customer's data to fetch.

Output

The node outputs JSON data representing the customer's details as returned by the Square API. This typically includes fields such as the customer's name, contact information, creation date, and any custom attributes stored in Square.

If an error occurs (e.g., customer not found), the output will contain an error message describing the issue.

No binary data is output by this operation.

Dependencies

  • Requires an active connection to the Square API using a valid API authentication token configured in n8n credentials.
  • The node dynamically selects the API base URL depending on whether the environment is set to sandbox or production.
  • No additional external dependencies are needed beyond the Square API access.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent Customer ID will result in an error from the Square API.
    • Network connectivity problems can cause request failures.
    • Missing or incorrect API credentials will prevent successful API calls.
  • Error messages:

    • If the customer does not exist, the node throws an error with the message returned by the Square API, e.g., "Customer not found".
    • If the node is configured to continue on failure, errors are returned as part of the output JSON with an error field.
    • To resolve errors, verify the Customer ID is correct, ensure API credentials are valid, and check network connectivity.

Links and References

Discussion