Square

Connect & Ingest data from Square

Square is a payment processing and business management platform that provides tools for point-of-sale, online payments, invoicing, and more. The Sling Square connector extracts data from the Square REST API, supporting payments, customers, orders, catalog items, invoices, refunds, inventory, and more.

circle-check

Setup

The following credentials and inputs are accepted:

Secrets:

  • access_token (required) -> Your Square Access Token

  • api_version (optional) -> Square API version to use (default: 2026-01-22)

Inputs:

  • base_url (optional) -> Base URL for the Square API (default: https://connect.squareup.com/v2). Use https://connect.squareupsandbox.com/v2 for sandbox testing.

  • anchor_date (optional) -> The starting date for historical data extraction (default: 1 year ago). Format: YYYY-MM-DD

Getting Your Access Token

  1. Create or select an application

  2. Go to Credentials in the left sidebar

  3. Copy the Access Token for production, or use the Sandbox Access Token for testing

circle-exclamation

Using sling conns

Environment Variable

See here to learn more about the .env.sling file.

Sling Env File YAML

See here to learn more about the sling env.yaml file.

With sandbox and anchor date:

Replication

Here's an example replication configuration to sync Square data to a PostgreSQL database:

Full refresh example for reference data:

Endpoints

Core Payment Data

Endpoint
Description
Incremental

locations

Business locations

No

payments

Payment transactions

Yes

refunds

Payment refunds

Yes

payouts

Payouts to bank accounts

Yes

disputes

Payment disputes

No

Customers

Endpoint
Description
Incremental

customers

Customer records

Yes

Orders & Invoices

Endpoint
Description
Incremental

orders

Orders (iterates over locations)

Yes

invoices

Invoices (iterates over locations)

No

Catalog & Inventory

Endpoint
Description
Incremental

catalog_objects

Items, categories, taxes, discounts, modifiers

Yes

inventory_counts

Inventory counts per item variation and location

Yes

Other

Endpoint
Description
Incremental

team_members

Team/employee members

No

subscriptions

Subscriptions

No

gift_cards

Gift cards

No

loyalty_accounts

Loyalty program accounts

No

To discover available endpoints:

Incremental Sync

The Square connector supports incremental sync on several endpoints using different timestamp fields:

  • payments, refunds: Uses updated_at_begin_time parameter to fetch records updated since last sync

  • customers: Uses the search API with updated_at filter

  • orders: Uses date_time_filter.updated_at in the search API

  • catalog_objects: Uses begin_time parameter for modified objects

  • inventory_counts: Uses updated_after parameter

  • payouts: Uses begin_time parameter based on creation date

First Run Behavior

  • Fetches all records from anchor_date (default: 1 year ago) to present

  • Subsequent runs only fetch records updated after the last sync

Location-Dependent Endpoints

The orders and invoices endpoints require a location ID. The connector automatically:

  1. Fetches all locations from the locations endpoint

  2. Iterates over each location to retrieve orders and invoices

Ensure the locations endpoint runs before orders and invoices in your replication.

Rate Limiting

Square API rate limits vary by endpoint but are generally around 5-10 requests per second. The connector:

  • Uses conservative rate limiting (5 requests/second)

  • Retries with exponential backoff on 429 (rate limit) responses

  • Supports up to 5 retry attempts

If you are facing issues connecting, please reach out to us at [email protected]envelope, on discordarrow-up-right or open a Github Issue herearrow-up-right.

Last updated

Was this helpful?