Square Sync
Syncs Square catalog, inventory, and modifier data into read-only Payload collections with webhook-driven updates.
Installation
pnpm add payloadcms-plugin-square About
This plugin connects a Square account to a Payload project and mirrors Square's catalog into local Payload collections. On Payload startup it runs through `onInit` and pulls categories, modifier lists, items with their variations, and inventory counts via the Square Node.js SDK, writing them into five read-only collections grouped under a `Square` sidebar group: `square-categories`, `square-items`, `square-item-variations`, `square-modifier-lists`, and `square-inventory`. Square stays the source of truth. The generated collections disable create and delete access and mark the synced fields as read-only, so editors cannot push divergent data back into Square. Each collection exposes a `GET /api/{slug}/refresh` endpoint, and the plugin injects a Refresh button into the admin list view through a React client component so an editor can re-sync a single collection on demand. For live updates the plugin registers a `POST /api/square-webhook` endpoint and verifies inbound Square notifications with `WebhooksHelper.verifySignature` against the configured signature key and notification URL. Supported events are `catalog.version.updated`, which re-syncs categories, modifiers, and items, and `inventory.count.updated`, which re-syncs inventory. Both event types and the webhook URL must match what is registered in the Square Developer Dashboard. Configuration is a single options object: `accessToken`, `environment` (defaults to Sandbox), `debug`, `enabled`, and an optional `webhooks` block with `signatureKey`, `url`, and `events`. The plugin targets Payload 3.x with Next.js 15 and React 19, and requires the `square` SDK as a peer dependency. It does not handle checkout, payments, or orders, only catalog and inventory synchronization.
Package info
- Package name
payloadcms-plugin-square- Latest version
1.3.0- Unpacked size
- 164 kB
- License
- MIT
- Weekly downloads
- 57
- Last publish
- Oct 14, 2025
Similar plugins
More in CommerceStripe
Syncs Payload collections with Stripe resources and routes Stripe webhooks and API calls through Payload.
Paystack
Integrate Paystack with Payload CMS for resource management and two-way sync.
ShipStation integration
Integrates ShipStation shipping features into Payload CMS for ecommerce.
Invoice PDF
Manage invoices and quotes with PDF generation and email delivery.
Google Merchant Center Ecommerce Integration
Sync products with Google Merchant Center from Payload CMS.
GA4 Analytics
Integrates Google Analytics 4 into Payload CMS with admin dashboards and reporting.