Design note — Square connector (square)

Target registry item: C7 (catalog row only — available: false, wave 4, demand-driven; playbook §4.3 "Non-Shopify commerce / POS", OB-GAP-3). Status: design note only — NOT built. The catalog row enumerates the two fields below so the surface can say "not yet available"; posting any payload is refused 409 provider_not_available. Built only when a tenant declares demand (docs/OPEN_ITEMS.md row). CDoD points 1–14 tracked in docs/reports/ONBOARDING_CONNECTORS_STATE.md.

Auth

Read-only, merchant-owned (D2/D11). Square distinguishes (vendor docs, fetched 2026-10-12) a personal access token — unscoped, full access to the developer's own Square account, found in the Developer Console under the app's Credentials (Production vs Sandbox tabs) — from OAuth access tokens, which are scoped and granted by a seller to a third-party app. The C7 field set is the typed shape: the customer creates an application in their own Developer Console and supplies its production personal access token. Because that token is unscoped, read-only is a property of the adapter, not of the credential — the card says so, and the preferred later path is a platform OAuth app (owner-ruled, Track O) requesting read scopes only.

Vault-only per (tenant, provider); no environment fallback; vault error 503; absence merchant_credentials_not_configured.

Fields (catalog row)

key label secret required pattern help
access_token Access token (production) yes yes — Square Developer Console → your application → Credentials → Production tab → access token. Sandbox tokens are refused. This token is unscoped: treat it as a full-account credential and rotate it on offboarding. Never echoed.
location_id Location ID no yes — Developer Console → Locations, or Square Dashboard → Account & settings → Business → Locations (the id, not the name). One location per vault entry (OB-GAP-6).

Scopes

Personal access tokens carry no scopes. On the OAuth path (later): MERCHANT_PROFILE_READ, ORDERS_READ, PAYMENTS_READ, ITEMS_READ only — the exact names are confirmed against Square's permissions reference at build time (CDoD point 1; the fetched page defers to that reference). The adapter never calls a write endpoint (build-time test).

Data topics

Orders and payments (totals, tenders, line items, catalog object ids, dates) and catalog items/variations for the location — the order-economics inputs; locations/merchant profile for identification. Customers (Customer Directory) are person-level and out of the first build.

Orders/payments/catalog without buyer identifiers are the de-personalised remainder on the aggregate path. Buyer-linked fields (customer id, receipt email, card fingerprint) are person-level and flow only under a consent-registry grant with a per-subject basis; without one the mapper drops them before persistence (fail-closed evaluate_consent). Posture test pins both directions.

Mapper target

Commerce adapter → MAPPERS["square"] → ingest_gate → mizoki_unified_data; feeds Net Yield order economics (P3-1). No new store; no writeback. No merchant-classification readout (owner ruling 2026-10-06 defines only the Shopify one).

Failure modes → test-connection verdicts

Failure Verdict / fix
401 UNAUTHORIZED token_invalid → regenerate the production token.
Sandbox token (wrong environment) wrong_environment → use the Production tab.
location_id not among the account's locations location_not_found listing the ids the token can see.
Vault read error 503 fail-closed.

Flag

SQUARE_SYNC default OFF; available: false until CDoD point 14.

Owner / operator gates

Vendor references

← All docsView source on GitHub →