Single source of truth for Birkly CMS documentation

The Commerce plugin (plugins/commerce/) is Birkly’s content-first commerce platform: payment providers, the Commerce fieldtype, catalog index, inventory ledger, cart, checkout, orders, customers, discounts, gift cards, tax providers, shipping rate providers, import, and fulfillment.

It replaces the legacy Payments plugin (plugins/payments/ is now a compatibility shim).

Current documented build: Commerce 1.0.29 (P54 P3 — Commerce 0→1 foundation complete). For a beginner walkthrough, see Commerce plugin overview and the in-admin help shelf when Commerce is active.

Prerequisites

  1. Activate Commerce under Settings → Plugins.
  2. Configure at least one provider connection (Settings → Connections).
  3. Add the Commerce fieldtype to collection schemas for purchasable entries.

Admin areas

TabPurpose
DashboardRevenue, cohorts, needs-shipping / SLA breaches, avg fulfillment time, top products, affiliates (default landing)
OrdersCommercial history with frozen money/tax snapshots; Draft orders / Quotes (cart-free editor) live inside Orders
CustomersEmail-keyed profiles, CSV import, timeline; optional User Management link; no passwords
CatalogIndexed read model of sellable CMS entries
InventoryLedger SoR for countable stock (Unlimited · Simple · Locations); low-stock threshold → commerce_low_stock
SubscriptionsRecurring purchases and lifecycle
DiscountsPromotions v2: usage limits, min purchase, dates, free shipping, stacking
Gift CardsAdmin-issued store credit (sellable cards use field fulfillment gift_card)
SettingsConnections, General (fulfillment SLA hours), Fieldtypes, Mappings, Import & migrate, Shipping, Tax, Fulfillment, Activity, Documentation

Inside Settings → Import & migrate: Shopify cutover (one-time products, customers, archived orders), CSV imports, and Beta live product import adapters. Legacy Shop / Events migration appears only when legacy sources are detected. See Shopify cutover playbook.

Inside Settings → Tax: provider Manual or Stripe Tax (orthogonal to charge PSP), classes, class×country rates, optional B2B reverse charge. See Commerce tax.

Inside Settings → Shipping: rate provider Manual zones or EasyPost live quotes (weight required; fallback to zones). See Commerce shipping rates.

Inside Settings → Fulfillment: Manual / Export (default) or EasyPost (push + tracking webhook). ShipStation is an internal stub and is not merchant-selectable. See Commerce fulfillment.

Mental model

AreaRole
CatalogCheckout read model from CMS entries with Commerce fields
InventoryStock ledger (on hand, reserved, available, low threshold)
OrdersHistory — totals and tax lines are frozen at payment, not recalculated from current catalog
CustomersCommercial profiles keyed by email (not login credentials)

Commerce fieldtype

Add to any collection schema:

{ "name": "commerce", "type": "commerce", "label": "Pricing" }

Stored value (v2):

FieldNotes
fulfillmentship, deliver, register, gift_card, or none
tax_classProduct tax class (standard, reduced, zero, or custom). Default standard
weight_gramsRequired on ship when EasyPost live rates are on; optional dims length_mm / width_mm / height_mm
purchase_options[]id, label, billing, pricing_mode, price_cents, currency, interval?
quantity_availableCatalog projection of Inventory Available, or null for unlimited; capacity for register
skuOptional; defaults to entry slug

Tier grants are not on the fieldtype — configure Purchase mappings under Commerce → Settings → Mappings.

See Commerce fieldtype for panels and variants.

Public API

Base: /api/index.php?route=commerce

Cart actions: get, add, update, remove, checkout (entry-based lines from catalog index). Hybrid carts may return split_required / groups[]; pass group_key + checkout_session_id for split checkout. See Hybrid cart.

Affiliate: pass ?ref=partner_id — stored in session for checkout discount rules.

Draft-order admin actions: draft_order_create, draft_order_update, draft_order_preview, draft_order_get, draft_order_search_catalog, draft_order_checkout.

Template functions

FunctionPurpose
{commerce_cart_count}Items in session cart
{commerce_cart_url}Cart API URL
{commerce_buy_url entry_id}Quick checkout for one entry
{commerce_add_to_cart entry_id qty}Add-to-cart URL

Shelf services

Service IDNotes
commerce_shelfPrimary API
payment_shelfLegacy alias — same instance

Consumer plugins (Shopping Cart, Events) continue to use payment_shelf during transition.

Coexistence with Shop & Events

PluginStatus
shopping_cartLegacy — uses shop_products collection
eventsLegacy — uses events collection + RSVP

New sites: use Commerce fieldtype on any collection. Legacy plugins are not removed. Migration wizard under Settings → Import & migrate appears only when legacy sources are detected.