> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Linking Square as a source Canonical URL: https://posthog.com/docs/data-pipelines/sources/square > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ## On this page - [Adding a data source](#adding-a-data-source) - [Configuration](#configuration) - [Supported tables](#supported-tables) - [Sync methods](#sync-methods) ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70) ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d) Let AI connect your sources for you Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog. `npx @posthog/wizard warehouse` ![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png) ![](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)Let AI connect your sources for you The Square connector syncs payments, refunds, customers, locations, and catalog data from your Square account into PostHog. ## Adding a data source 1. Go to the [sources tab](https://app.posthog.com/data-management/sources) of the data pipeline section in PostHog. 2. Click **\+ New source** and then click **Link** next to Square. 3. You need a Personal Access Token from Square. In the [Square Developer Dashboard](https://developer.squareup.com/apps), open your application (or create one) and navigate to **Credentials**. Copy your **Personal Access Token**. Grant the following read permissions for the data you want to sync: - `PAYMENTS_READ` – payments and refunds - `CUSTOMERS_READ` – customers - `MERCHANT_PROFILE_READ` – locations - `ITEMS_READ` – catalog 4. Back in PostHog, paste the access token into the **Access token** field and select your **Environment**: - **Production** – for live Square data (`connect.squareup.com`) - **Sandbox** – for test data (`connect.squareupsandbox.com`) 5. Click **Next**. Select the tables you want to sync and configure the sync method and frequency. Click **Import**. Once the syncs are complete, you can start using Square data in PostHog. ## Configuration | Option | Type | Required | | --- | --- | --- | | `Access token` | password | Yes | | `Environment` | select | Yes | ## Supported tables | Table | Description | Sync method | Incremental field | Primary key | | --- | --- | --- | --- | --- | | `payments` | A payment taken by the seller, representing a single attempt to collect money from a customer. | Incremental, Full refresh | created\_at | — | | `refunds` | A refund of all or part of a previously processed Square payment. | Incremental, Full refresh | created\_at | — | | `customers` | A customer profile in the seller's Square Customer Directory. | Full refresh | — | — | | `locations` | A business location (store) belonging to the Square seller account. | Full refresh | — | — | | `catalog` | A catalog object — an item, variation, category, tax, discount, or modifier in the seller's catalog. | Full refresh | — | — | ## Sync methods The `payments` and `refunds` tables support incremental syncing using `created_at` as the replication key. This means only new records are fetched on each sync. The `customers`, `locations`, and `catalog` tables sync via full table refresh only. Square's API doesn't expose a server-side time filter for these resources on their GET endpoints. > **Note:** The `catalog` table includes items, categories, taxes, and other catalog objects from your Square account.