Integrates ShipStation's V1 API into Payload ecommerce projects to calculate shipping rates, validate addresses and handle multi-package shipments. It extends products, variants and orders with shipping details and adds shipping settings and zones. It is meant to be added after the ecommerce plugin and needs ShipStation API credentials and a warehouse ID.
ShipStation integration plugin for Payload CMS ecommerce
Installation
npm i @frydigital/payload-plugin-shipstation2
Stars
1
Forks
3
Open Issues
9 months ago
Last Updated
25
Weekly Downloads
v1.0.0
npm Version
195.0 KB
Unpacked Size
2
Dependencies
20 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 2 |
| Dec 4, 2026 | 2 |
| Dec 3, 2026 | 2 |
| Dec 2, 2026 | 2 |
| Dec 1, 2026 | 2 |
| Nov 30, 2026 | 2 |
| Nov 29, 2026 | 2 |
| Nov 28, 2026 | 2 |
| Nov 27, 2026 | 2 |
| Nov 26, 2026 | 2 |
| Nov 25, 2026 | 2 |
| Nov 24, 2026 | 2 |
| Nov 23, 2026 | 2 |
| Nov 22, 2026 | 2 |
| Nov 21, 2026 | 2 |
| Nov 20, 2026 | 2 |
| Nov 19, 2026 | 2 |
| Nov 18, 2026 | 2 |
| Nov 17, 2026 | 2 |
| Nov 16, 2026 | 2 |
| Nov 15, 2026 | 2 |
| Nov 14, 2026 | 2 |
| Nov 13, 2026 | 2 |
| Nov 12, 2026 | 2 |
| Nov 11, 2026 | 2 |
| Nov 10, 2026 | 2 |
| Nov 9, 2026 | 2 |
| Nov 8, 2026 | 2 |
| Nov 7, 2026 | 2 |
| Nov 6, 2026 | 2 |
| Nov 5, 2026 | 2 |
| Nov 4, 2026 | 2 |
| Nov 3, 2026 | 2 |
| Nov 2, 2026 | 2 |
| Nov 1, 2026 | 2 |
| Oct 31, 2026 | 2 |
| Oct 30, 2026 | 2 |
| Oct 29, 2026 | 2 |
| Oct 28, 2026 | 2 |
| Oct 27, 2026 | 2 |
| Oct 26, 2026 | 2 |
| Oct 25, 2026 | 2 |
| Oct 24, 2026 | 2 |
| Oct 23, 2026 | 2 |
| Oct 22, 2026 | 2 |
| Oct 21, 2026 | 2 |
| Oct 20, 2026 | 2 |
| Oct 19, 2026 | 2 |
| Oct 18, 2026 | 2 |
| Oct 17, 2026 | 2 |
| Oct 16, 2026 | 2 |
| Oct 15, 2026 | 2 |
| Oct 14, 2026 | 2 |
| Oct 13, 2026 | 2 |
| Oct 12, 2026 | 2 |
| Oct 11, 2026 | 2 |
| Oct 10, 2026 | 2 |
| Oct 9, 2026 | 2 |
| Oct 8, 2026 | 2 |
| Oct 7, 2026 | 2 |
| Oct 6, 2026 | 2 |
| Oct 5, 2026 | 2 |
| Oct 4, 2026 | 2 |
| Oct 3, 2026 | 2 |
| Oct 2, 2026 | 2 |
| Oct 1, 2026 | 2 |
| Sep 30, 2026 | 2 |
| Sep 29, 2026 | 2 |
| Sep 28, 2026 | 2 |
| Sep 27, 2026 | 2 |
| Sep 26, 2026 | 2 |
| Sep 25, 2026 | 2 |
| Sep 24, 2026 | 2 |
| Sep 23, 2026 | 2 |
| Sep 22, 2026 | 2 |
| Sep 21, 2026 | 2 |
| Sep 20, 2026 | 2 |
| Sep 19, 2026 | 2 |
| Sep 18, 2026 | 2 |
| Sep 17, 2026 | 2 |
| Sep 16, 2026 | 2 |
| Sep 15, 2026 | 2 |
| Sep 14, 2026 | 2 |
| Sep 13, 2026 | 2 |
| Sep 12, 2026 | 2 |
| Sep 11, 2026 | 2 |
| Sep 10, 2026 | 2 |
| Sep 9, 2026 | 2 |
| Sep 8, 2026 | 2 |
| Sep 7, 2026 | 2 |
| Sep 6, 2026 | 2 |
140 since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 14 |
| Dec 4, 2026 | 15 |
| Dec 3, 2026 | 14 |
| Dec 2, 2026 | 14 |
| Dec 1, 2026 | 8 |
| Nov 30, 2026 | 8 |
| Nov 29, 2026 | 13 |
| Nov 28, 2026 | 14 |
| Nov 27, 2026 | 14 |
| Nov 26, 2026 | 12 |
| Nov 25, 2026 | 12 |
| Nov 24, 2026 | 13 |
| Nov 23, 2026 | 13 |
| Nov 22, 2026 | 10 |
| Nov 21, 2026 | 8 |
| Nov 20, 2026 | 7 |
| Nov 19, 2026 | 9 |
| Nov 18, 2026 | 16 |
| Nov 17, 2026 | 13 |
| Nov 16, 2026 | 13 |
| Nov 15, 2026 | 9 |
| Nov 14, 2026 | 13 |
| Nov 13, 2026 | 13 |
| Nov 12, 2026 | 11 |
| Nov 11, 2026 | 4 |
| Nov 10, 2026 | 10 |
| Nov 9, 2026 | 10 |
| Nov 8, 2026 | 10 |
| Nov 7, 2026 | 12 |
| Nov 6, 2026 | 15 |
| Nov 5, 2026 | 16 |
| Nov 4, 2026 | 16 |
| Nov 3, 2026 | 12 |
| Nov 2, 2026 | 12 |
| Nov 1, 2026 | 12 |
| Oct 31, 2026 | 6 |
| Oct 30, 2026 | 3 |
| Oct 29, 2026 | 2 |
| Oct 28, 2026 | 2 |
| Oct 27, 2026 | 1 |
| Oct 26, 2026 | 2 |
| Oct 25, 2026 | 3 |
| Oct 24, 2026 | 3 |
| Oct 23, 2026 | 3 |
| Oct 22, 2026 | 6 |
| Oct 21, 2026 | 6 |
| Oct 20, 2026 | 5 |
| Oct 19, 2026 | 4 |
| Oct 18, 2026 | 3 |
| Oct 17, 2026 | 3 |
| Oct 16, 2026 | 4 |
| Oct 15, 2026 | 1 |
| Oct 14, 2026 | 1 |
| Oct 13, 2026 | 1 |
| Oct 12, 2026 | 1 |
| Oct 11, 2026 | 2 |
| Oct 10, 2026 | 2 |
| Oct 9, 2026 | 1 |
| Oct 8, 2026 | 1 |
| Oct 7, 2026 | 6 |
| Oct 6, 2026 | 6 |
| Oct 5, 2026 | 7 |
| Oct 4, 2026 | 9 |
| Oct 3, 2026 | 15 |
| Oct 2, 2026 | 15 |
| Oct 1, 2026 | 15 |
| Sep 30, 2026 | 10 |
| Sep 29, 2026 | 10 |
| Sep 28, 2026 | 9 |
| Sep 27, 2026 | 6 |
| Sep 26, 2026 | 6 |
| Sep 25, 2026 | 8 |
| Sep 24, 2026 | 8 |
| Sep 23, 2026 | 8 |
| Sep 22, 2026 | 9 |
| Sep 21, 2026 | 15 |
| Sep 20, 2026 | 15 |
| Sep 19, 2026 | 9 |
| Sep 18, 2026 | 7 |
| Sep 17, 2026 | 7 |
| Sep 16, 2026 | 8 |
| Sep 15, 2026 | 8 |
| Sep 14, 2026 | 2 |
| Sep 13, 2026 | 3 |
| Sep 12, 2026 | 4 |
| Sep 11, 2026 | 10 |
| Sep 10, 2026 | 10 |
| Sep 9, 2026 | 12 |
| Sep 8, 2026 | 14 |
| Sep 7, 2026 | 15 |
| Sep 6, 2026 | 14 |
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/1100764656-root)<a href="https://payloaddirectory.dev/plugins/1100764656-root"><img src="https://payloaddirectory.dev/badge/1100764656-root.svg" alt="Payload Directory"></a>README
A comprehensive ShipStation integration plugin for Payload CMS ecommerce projects. Provides real-time shipping rate calculation, address validation, multi-package handling, and webhook support for tracking updates.
Note: This plugin uses the ShipStation V1 API (
ssapi.shipstation.com). See ShipStation API Documentation for full API reference.
✅ Phase 1 (Available Now)
🚧 Phase 2
pnpm add @frydigital/payload-plugin-shipstation
# or
npm install @frydigital/payload-plugin-shipstation
# or
yarn add @frydigital/payload-plugin-shipstation
Add the following to your .env file (see .env.example for full template):
# ShipStation V1 API Configuration
# Get credentials from ShipStation: Settings > Account > API Settings
# Option 1: Combined format (API Key:Secret)
SHIPSTATION_API_KEY=your_api_key:your_api_secret
# Option 2: Separate variables
# SHIPSTATION_API_KEY=your_api_key
# SHIPSTATION_API_SECRET=your_api_secret
# Warehouse ID - numeric ID from ShipStation (Settings > Shipping > Ship From Locations)
SHIPSTATION_WAREHOUSE_ID=123456
# Optional: Webhook secret for signature verification
SHIPSTATION_WEBHOOK_SECRET=your_webhook_secret
# Optional: Redis for rate caching
REDIS_URL=redis://localhost:6379
Add the plugin to your Payload configuration:
// payload.config.ts
import { shipStationPlugin } from '@frydigital/payload-plugin-shipstation'
export default buildConfig({
plugins: [
// Add after ecommerce plugin
shipStationPlugin({
apiKey: process.env.SHIPSTATION_API_KEY!,
warehouseId: process.env.SHIPSTATION_WAREHOUSE_ID!,
// Enable features
enabledFeatures: {
addressValidation: true,
multiPackage: true,
autoCreateShipments: false,
webhooks: true,
},
// Canadian provincial rates (in cents)
provincialRates: [
{ province: 'BC', baseRate: 1200, enabled: true },
{ province: 'AB', baseRate: 1000, enabled: true },
{ province: 'SK', baseRate: 1500, enabled: true },
{ province: 'MB', baseRate: 1500, enabled: true },
{ province: 'ON', baseRate: 1000, enabled: true },
{ province: 'QC', baseRate: 1200, enabled: true },
{ province: 'NB', baseRate: 1500, enabled: true },
{ province: 'NS', baseRate: 1800, enabled: true },
{ province: 'PE', baseRate: 1800, enabled: true },
{ province: 'NL', baseRate: 2000, enabled: true },
{ province: 'YT', baseRate: 2500, enabled: true },
{ province: 'NT', baseRate: 3000, enabled: true },
{ province: 'NU', baseRate: 3500, enabled: true },
],
// Free shipping configuration
freeShippingConfig: {
threshold: 10000, // $100.00 CAD
eligibleCountries: ['CA'],
excludedShippingClasses: ['oversized'],
},
// Shipping class rate modifiers
shippingClassModifiers: {
standard: 1.0,
expedited: 1.5,
fragile: 1.3,
oversized: 2.0,
custom: 1.0,
},
// Multi-package limits
maxPackageWeight: { value: 70, unit: 'pound' },
maxPackageDimensions: { length: 36, width: 24, height: 24, unit: 'inch' },
// Cache configuration
cache: {
enableCache: true,
cacheTTL: 300, // 5 minutes
redisUrl: process.env.REDIS_URL,
fallbackToMemory: true,
},
// Webhook configuration
webhookSecret: process.env.SHIPSTATION_WEBHOOK_SECRET,
enabledWebhookEvents: [
'tracking.updated',
'tracking.delivered',
],
}),
],
})
// app/api/calculate-shipping/route.ts
import { NextRequest, NextResponse } from 'next/server'
export async function POST(req: NextRequest) {
const { cartId, shippingAddress } = await req.json()
const response = await fetch('/api/shipping/calculate-rates', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ cartId, shippingAddress }),
})
const { rates, freeShipping } = await response.json()
return NextResponse.json({ rates, freeShipping })
}
{
"rates": [
{
"serviceName": "Canada Post Regular Parcel",
"serviceCode": "canada_post_regular_parcel",
"carrierCode": "canada_post",
"shipmentCost": 12.50,
"otherCost": 0,
"deliveryDays": 3,
"estimatedDeliveryDate": "2025-11-23T23:59:00Z"
}
],
"freeShipping": false,
"appliedRule": "provincial_rate",
"cacheHit": true
}
const response = await fetch('/api/shipping/validate-address', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
address: {
street1: '123 Main Street',
city: 'Toronto',
state: 'ON',
postalCode: 'M5H 2N2',
country: 'CA',
},
}),
})
const { isValid, normalizedAddress, errors } = await response.json()
Add shipping details to your products:
// When creating/updating products
await payload.create({
collection: 'products',
data: {
title: 'Widget',
// ... other product fields
shippingDetails: {
weight: { value: 2.5, unit: 'pound' },
dimensions: { length: 12, width: 8, height: 4, unit: 'inch' },
shippingClass: 'standard',
requiresSignature: false,
hazardousMaterials: false,
},
},
})
Enable custom shipping zones for advanced rate calculations based on postal codes:
{
name: 'Greater Toronto Area',
enabled: true,
priority: 1,
postalCodePatterns: ['^M[0-9][A-Z]'], // Toronto postal codes
countries: ['CA'],
provinces: ['ON'],
rateType: 'flat',
baseRate: 800, // $8.00
freeShippingThreshold: 5000, // $50.00
}
https://yourdomain.com/api/shipping/shipstation/webhookThe plugin automatically:
| Endpoint | Method | Description |
|---|---|---|
/api/shipping/calculate-rates | POST | Calculate shipping rates for cart |
/api/shipping/validate-address | POST | Validate and correct address |
/api/shipping/estimate | GET | Quick rate estimate |
/api/shipping/shipstation/webhook | POST | ShipStation webhook handler |
shippingDetails group with weight, dimensions, shipping classshippingDetails with tracking info, costs, historycd packages/payload-plugin-shipstation
pnpm install
pnpm test
pnpm build
Link the plugin locally:
cd packages/payload-plugin-shipstation
pnpm link
cd ../../
pnpm link @frydigital/payload-plugin-shipstation
shipstation:rate:*# Run tests once
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverage
# Run tests with UI
pnpm test:ui
The plugin has comprehensive test coverage:
# Build the plugin
pnpm build
# Watch mode for development
pnpm dev
# Clean build artifacts
pnpm clean
Tests run automatically on:
master/main branchesWe welcome contributions! Please:
pnpm test)MIT License - see LICENSE file for details
Built with ❤️ for the Payload CMS community.
Topics
payload plugin shipping
Shipping addresses, carrier rates, labels, label refunds and tracking webhooks for Payload, with EasyPost as provider
75221/wk0v3
payload shipping rates
Shipping zones, methods and rate quotes for Payload ecommerce, in integer minor units
7314/wk2v3
payload fulfillment
Extra order states, transition history, internal notes and tracking fields for Payload ecommerce orders
7332/wk1v3
payload shipping classes
Weight, dimensions and a shipping class on Payload products and variants, stored in one canonical unit
7210/wk2v3
payload plugin printify
Printify print-on-demand integration for Payload's ecommerce plugin with product sync and order fulfillment
66378/wk1v3
payload appointments plugin
Appointment booking for Payload with services, team members, availability, waitlist, payments, emails and iCal feeds
4633/wk102v3