Commerce & Payments

Add a cart, checkout, and payment processor to your site. No additional transaction fees from SirSluginston.

Do You Need Commerce?

Commerce is the simplest decision: are you selling something?

  • Physical goods (boxes, merch, food) → yes
  • Digital goods (downloads, memberships, gift cards) → yes
  • Bookings and reservations → yes, with the right processor
  • A content site with no transactions → no

Most commerce platforms bundle payments, inventory, and storefront into one opinionated system — and charge a percentage of every sale on top of processing fees. Commerce adds checkout to your existing SirSluginston site, using payment processors you already pay for, with no additional per-sale fees from SirSluginston.

Commerce also increases your infrastructure footprint, which raises your solvency cap — meaning your ad publisher ID covers a higher monthly cost before SirSluginston Co earns anything. Your infrastructure is always covered before they earn.

Family Foods: Real Usage

Each brand in the Family Foods group uses Commerce differently — which illustrates the range well.

Cousin's Coffeehouse was the first to add it. They sell seasonal gift card bundles online ($25, $50, $100) and a monthly coffee subscription box. They chose Stripe for subscriptions and PayPal as a backup payment method for international buyers.

Pa's Donuts uses Commerce for pre-orders. Pa bakes in limited batches — he can only make 80 dozen per day. Commerce lets customers pre-order for next-day pickup. They use Square because it syncs with their in-store Square terminal, keeping inventory in one place across online and walk-in sales. When a batch is nearly full, Sonar fires alerts to subscribers who haven't ordered yet.

Ma's Bakery does not have Commerce. She doesn't sell online. She added Commerce once, briefly, for a holiday pre-order campaign, then removed it when the campaign ended. Commerce is an env var, not a permanent feature.

What Gets Added

Enabling Commerce adds:

  1. Cart icon in the Header — hidden until Commerce is enabled
  2. /cart page — visitor shopping cart, persisted via CartContext
  3. /checkout page — connects to your configured payment processor
  4. Products table<EntityName>-Products in your database

Note: The /cart and /checkout pages are in active development. The cart context is complete. Full checkout flow is coming in the next release.

Payment Processors

Commerce supports Stripe, Square, and PayPal simultaneously. All three can be configured at once — your admin panel shows a payment method selector at checkout based on whichever processors have active credentials.

Provider Best for Inventory sync
Stripe Subscriptions, digital goods, gift cards No
Square Physical retail, in-person + online together Yes
PayPal International buyers, existing PayPal users No

Leave a provider's credentials blank to disable it. Configure in Settings → Commerce in your admin panel.

Products

Your product catalog lives in the <EntityName>-Products table. Each product record includes:

  • id, name, description
  • price (in cents)
  • imageUrl
  • inventory (Square only — syncs bidirectionally with Square Terminal)
  • metadata (processor-specific fields, custom attributes)

Sonar Credits are also a Commerce product type — if you use Sonar, you can sell credit bundles through your standard checkout flow. Pa's Donuts sells a '50 Alerts' bundle for $2.99. Cousin's Coffeehouse gives credits away free by setting the price to $0.

How to Add Commerce

Commerce is selected during adapter init, or enabled manually:

NEXT_PUBLIC_SIRSLUGINSTON_COMMERCE=true

# Stripe
STRIPE_SECRET_KEY=sk_live_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...

Install the package:

npm install @sirsluginston/commerce

Add to next.config.mjs:

transpilePackages: ['@sirsluginston/core', '@sirsluginston/commerce']

Works With

Commerce + Sonar — Sonar Credits are sold as a Commerce product. Visitors buy a credit bundle (or receive free credits) and spend them on alert subscriptions. You set the price — $0 makes alerts free, any positive amount enables paid subscriptions.

Commerce + Intellect — The Intellect chatbox can query your Products table to give inventory-aware responses and guide visitors toward checkout.

Commerce + Ocean — External pricing or availability data from Ocean can drive your product catalog. If your product prices come from a supplier feed or live pricing API, Ocean keeps them current automatically — no manual admin panel updates needed.

Loading Advertisement...