Connects a Square account to Payload and syncs categories, items with variations, modifier lists and inventory counts into read-only collections. Sync runs on startup and can be triggered from admin refresh buttons. Optional webhooks with signature verification resync on catalog and inventory changes. Requires the Square Node.js SDK and an access token.
Unofficial Square plugin for Payload
Installation
npm i payloadcms-plugin-square5
Stars
0
Forks
0
Open Issues
1 years ago
Last Updated
130
Weekly Downloads
v1.3.0
npm Version
164.3 KB
Unpacked Size
0
Dependencies
50 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 5 |
| Dec 4, 2026 | 5 |
| Dec 3, 2026 | 5 |
| Dec 2, 2026 | 5 |
| Dec 1, 2026 | 5 |
| Nov 30, 2026 | 5 |
| Nov 29, 2026 | 5 |
| Nov 28, 2026 | 5 |
| Nov 27, 2026 | 5 |
| Nov 26, 2026 | 5 |
| Nov 25, 2026 | 5 |
| Nov 24, 2026 | 5 |
| Nov 23, 2026 | 5 |
| Nov 22, 2026 | 5 |
| Nov 21, 2026 | 5 |
| Nov 20, 2026 | 5 |
| Nov 19, 2026 | 5 |
| Nov 18, 2026 | 5 |
| Nov 17, 2026 | 5 |
| Nov 16, 2026 | 5 |
| Nov 15, 2026 | 5 |
| Nov 14, 2026 | 5 |
| Nov 13, 2026 | 5 |
| Nov 12, 2026 | 5 |
| Nov 11, 2026 | 5 |
| Nov 10, 2026 | 5 |
| Nov 9, 2026 | 5 |
| Nov 8, 2026 | 5 |
| Nov 7, 2026 | 5 |
| Nov 6, 2026 | 5 |
| Nov 5, 2026 | 5 |
| Nov 4, 2026 | 5 |
| Nov 3, 2026 | 5 |
| Nov 2, 2026 | 5 |
| Nov 1, 2026 | 5 |
| Oct 31, 2026 | 5 |
| Oct 30, 2026 | 5 |
| Oct 29, 2026 | 5 |
| Oct 28, 2026 | 5 |
| Oct 27, 2026 | 5 |
| Oct 26, 2026 | 5 |
| Oct 25, 2026 | 5 |
| Oct 24, 2026 | 5 |
| Oct 23, 2026 | 5 |
| Oct 22, 2026 | 5 |
| Oct 21, 2026 | 5 |
| Oct 20, 2026 | 5 |
| Oct 19, 2026 | 5 |
| Oct 18, 2026 | 5 |
| Oct 17, 2026 | 5 |
| Oct 16, 2026 | 5 |
| Oct 15, 2026 | 5 |
| Oct 14, 2026 | 5 |
| Oct 13, 2026 | 5 |
| Oct 12, 2026 | 5 |
| Oct 11, 2026 | 5 |
| Oct 10, 2026 | 5 |
| Oct 9, 2026 | 5 |
| Oct 8, 2026 | 5 |
| Oct 7, 2026 | 5 |
| Oct 6, 2026 | 5 |
| Oct 5, 2026 | 5 |
| Oct 4, 2026 | 5 |
| Oct 3, 2026 | 5 |
| Oct 2, 2026 | 5 |
| Oct 1, 2026 | 5 |
| Sep 30, 2026 | 5 |
| Sep 29, 2026 | 5 |
| Sep 28, 2026 | 5 |
| Sep 27, 2026 | 5 |
| Sep 26, 2026 | 5 |
| Sep 25, 2026 | 5 |
| Sep 24, 2026 | 5 |
| Sep 23, 2026 | 5 |
| Sep 22, 2026 | 5 |
| Sep 21, 2026 | 5 |
| Sep 20, 2026 | 5 |
| Sep 19, 2026 | 5 |
| Sep 18, 2026 | 5 |
| Sep 17, 2026 | 5 |
| Sep 16, 2026 | 5 |
| Sep 15, 2026 | 5 |
| Sep 14, 2026 | 5 |
| Sep 13, 2026 | 5 |
| Sep 12, 2026 | 5 |
| Sep 11, 2026 | 5 |
| Sep 10, 2026 | 5 |
| Sep 9, 2026 | 5 |
| Sep 8, 2026 | 5 |
| Sep 7, 2026 | 5 |
| Sep 6, 2026 | 5 |
25+13 since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 25 |
| Dec 4, 2026 | 24 |
| Dec 3, 2026 | 28 |
| Dec 2, 2026 | 15 |
| Dec 1, 2026 | 16 |
| Nov 30, 2026 | 18 |
| Nov 29, 2026 | 51 |
| Nov 28, 2026 | 51 |
| Nov 27, 2026 | 52 |
| Nov 26, 2026 | 46 |
| Nov 25, 2026 | 46 |
| Nov 24, 2026 | 44 |
| Nov 23, 2026 | 43 |
| Nov 22, 2026 | 12 |
| Nov 21, 2026 | 12 |
| Nov 20, 2026 | 14 |
| Nov 19, 2026 | 15 |
| Nov 18, 2026 | 19 |
| Nov 17, 2026 | 19 |
| Nov 16, 2026 | 18 |
| Nov 15, 2026 | 20 |
| Nov 14, 2026 | 20 |
| Nov 13, 2026 | 13 |
| Nov 12, 2026 | 25 |
| Nov 11, 2026 | 21 |
| Nov 10, 2026 | 24 |
| Nov 9, 2026 | 26 |
| Nov 8, 2026 | 23 |
| Nov 7, 2026 | 25 |
| Nov 6, 2026 | 27 |
| Nov 5, 2026 | 19 |
| Nov 4, 2026 | 20 |
| Nov 3, 2026 | 18 |
| Nov 2, 2026 | 16 |
| Nov 1, 2026 | 16 |
| Oct 31, 2026 | 15 |
| Oct 30, 2026 | 15 |
| Oct 29, 2026 | 10 |
| Oct 28, 2026 | 8 |
| Oct 27, 2026 | 6 |
| Oct 26, 2026 | 9 |
| Oct 25, 2026 | 10 |
| Oct 24, 2026 | 8 |
| Oct 23, 2026 | 6 |
| Oct 22, 2026 | 19 |
| Oct 21, 2026 | 37 |
| Oct 20, 2026 | 59 |
| Oct 19, 2026 | 161 |
| Oct 18, 2026 | 160 |
| Oct 17, 2026 | 163 |
| Oct 16, 2026 | 163 |
| Oct 15, 2026 | 153 |
| Oct 14, 2026 | 136 |
| Oct 13, 2026 | 117 |
| Oct 12, 2026 | 13 |
| Oct 11, 2026 | 13 |
| Oct 10, 2026 | 10 |
| Oct 9, 2026 | 12 |
| Oct 8, 2026 | 10 |
| Oct 7, 2026 | 9 |
| Oct 6, 2026 | 6 |
| Oct 5, 2026 | 5 |
| Oct 4, 2026 | 6 |
| Oct 3, 2026 | 6 |
| Oct 2, 2026 | 5 |
| Oct 1, 2026 | 7 |
| Sep 30, 2026 | 7 |
| Sep 29, 2026 | 41 |
| Sep 28, 2026 | 41 |
| Sep 27, 2026 | 42 |
| Sep 26, 2026 | 47 |
| Sep 25, 2026 | 47 |
| Sep 24, 2026 | 48 |
| Sep 23, 2026 | 49 |
| Sep 22, 2026 | 52 |
| Sep 21, 2026 | 67 |
| Sep 20, 2026 | 68 |
| Sep 19, 2026 | 65 |
| Sep 18, 2026 | 64 |
| Sep 17, 2026 | 61 |
| Sep 16, 2026 | 61 |
| Sep 15, 2026 | 25 |
| Sep 14, 2026 | 15 |
| Sep 13, 2026 | 12 |
| Sep 12, 2026 | 10 |
| Sep 11, 2026 | 13 |
| Sep 10, 2026 | 13 |
| Sep 9, 2026 | 16 |
| Sep 8, 2026 | 15 |
| Sep 7, 2026 | 13 |
| Sep 6, 2026 | 12 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/875287519-root)<a href="https://payloaddirectory.dev/plugins/875287519-root"><img src="https://payloaddirectory.dev/badge/875287519-root.svg" alt="Payload Directory"></a>README
A plugin for Payload to connect Square to your Payload project.
npm install payloadcms-plugin-square
Note that this plugin also requires the Square Node.js SDK to be installed in your project:
npm install square
npm install payloadcms-plugin-square square
# or
pnpm add payloadcms-plugin-square square
// payload.config.ts
import { squarePlugin } from 'payloadcms-plugin-square'
import { SquareEnvironment } from 'square'
export default buildConfig({
plugins: [
squarePlugin({
accessToken: process.env.SQUARE_ACCESS_TOKEN || '',
environment: SquareEnvironment.Production,
enabled: true,
debug: true, // Enable debug logging
}),
],
})
# .env
SQUARE_ACCESS_TOKEN=your_square_access_token_here
The plugin will automatically sync all Square data on startup!
import { squarePlugin } from 'payloadcms-plugin-square'
import { SquareEnvironment } from 'square'
export default buildConfig({
plugins: [
squarePlugin({
accessToken: process.env.SQUARE_ACCESS_TOKEN || '',
environment: SquareEnvironment.Production,
debug: false,
enabled: true,
webhooks: {
enabled: true,
signatureKey: process.env.SQUARE_WEBHOOK_SIGNATURE_KEY || '',
url: process.env.SQUARE_WEBHOOK_URL || 'https://yourdomain.com/api/square-webhook',
},
}),
],
})
Environment Variables:
# .env
SQUARE_ACCESS_TOKEN=your_square_access_token
SQUARE_WEBHOOK_SIGNATURE_KEY=your_webhook_signature_key
SQUARE_WEBHOOK_URL=https://yourdomain.com/api/square-webhook
| Option | Type | Required | Description |
|---|---|---|---|
accessToken | string | Yes | Your Square access token. You can find this in your Square Developer Dashboard. |
debug | boolean | No | If set to true, logs debug information to the console. Defaults to false. |
enabled | boolean | No | If set to false, the plugin will not run. Defaults to true. |
environment | Environment | No | The Square API environment to use. Defaults to Environment.Sandbox. |
webhooks | object | No | Webhook configuration for real-time updates from Square. See Webhook Configuration below. |
Enable real-time updates from Square by configuring webhooks:
squarePlugin({
accessToken: process.env.SQUARE_ACCESS_TOKEN,
webhooks: {
enabled: true,
signatureKey: process.env.SQUARE_WEBHOOK_SIGNATURE_KEY,
url: 'https://yourdomain.com/api/square-webhook',
events: ['catalog.version.updated', 'inventory.count.updated'] // Optional
}
})
Webhook Options:
| Option | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | Enable or disable webhook support |
signatureKey | string | Yes | Webhook signature key from Square Developer Dashboard |
url | string | Yes | The full URL where webhooks will be received (must match Square Dashboard) |
events | string[] | No | Array of event types to handle. Defaults to ['catalog.version.updated', 'inventory.count.updated'] |
Supported Events:
catalog.version.updated - Automatically resyncs categories, modifiers, and items when catalog changesinventory.count.updated - Automatically resyncs inventory counts when stock changesSee WEBHOOK_TROUBLESHOOTING.md for detailed webhook setup and troubleshooting.
β
Category Sync - Automatically syncs Square product categories
β
Item Sync - Syncs items with variations, images, and pricing
β
Variation Support - Full support for item variations with different prices
β
Image Sync - Syncs product images from Square
β
Measurement Units - Handles product measurements and units
β
Modifier Lists - Sync modifier lists (sizes, add-ons, etc.)
β
Modifier Options - Full support for single and multi-select modifiers
β
Modifier Pricing - Handles price adjustments for modifiers
β
Default Selections - Supports "on by default" modifier options
β
Item Modifier Links - Items linked to their applicable modifier lists
β
Inventory Counts - Real-time inventory count synchronization
β
Multi-location Support - Tracks inventory across multiple locations
β
Inventory States - Supports all inventory states (IN_STOCK, SOLD, RESERVED, etc.)
β
Batch Processing - Efficient batch API calls for large inventories
β
Webhook Integration - Receive real-time updates from Square
β
Signature Verification - Secure webhook signature validation
β
Auto-sync on Changes - Automatically resyncs when catalog or inventory changes
β
Event Handling - Processes catalog and inventory update events
β
Manual Refresh Buttons - Admin UI buttons to manually trigger syncs for each collection
β
Read-only Collections - Square data is read-only (Square is source of truth)
β
Grouped Collections - All Square collections organized in admin sidebar
β
Debug Mode - Detailed logging for troubleshooting
The plugin creates the following read-only collections in your Payload CMS:
square-categories - Product categories from Squaresquare-items - Products/items with variations, images, and modifier listssquare-item-variations - Reusable variation field schemasquare-modifier-lists - Modifier lists with options (sizes, add-ons, etc.)square-inventory - Inventory counts by location and stateAll collections include a manual refresh endpoint at /api/{collection-slug}/refresh and a refresh button in the admin UI.
On Payload startup (onInit), the plugin automatically syncs all data from Square in this order:
Each collection has a "Refresh" button in the admin UI that triggers a manual sync for that specific collection.
When webhooks are enabled and configured:
If you want to contribute to this project, please read the CONTRIBUTING file.
This project is licensed under the MIT License - see the LICENSE file for details.
ecommerce
Ecommerce utilities for Payload with idempotent Stripe confirmation, orders, carts and inventory handling
10019.0k/wk46.1kv3 v4
payload ecommerce
Products, carts, orders and coupons for Payload 3 with server-side helpers and stock tracking
72537/wk2v3
payload stock reservation
Validates variant stock and price at checkout and holds stock until payment settles or the hold expires
76152/wk1v3
payload plugin restock
Supplier lists, purchase orders and receiving drafted from stock levels, with copy-ready orders for suppliers withoutβ¦
75232/wk0v3
payload plugin shipping
Shipping addresses, carrier rates, labels, label refunds and tracking webhooks for Payload, with EasyPost as provider
75221/wk0v3
payload plugin sample kits
Track sample kits from stock to keeper and back with custody trails, lot recalls and one-time activation secrets
74441/wk0v3