Membership products (Vendor)
Executive summary
Section titled “Executive summary”Membership plans under Customers let a vendor define subscription-style products for their customers (audience vendor_customer). This is separate from admin SaaS vendor plans (platform_vendor).
Route and access
Section titled “Route and access”/dashboard/membership-products— registered before/dashboard/customers/:idsomembership-productsis not captured as a customer id.- Module:
customer(VendorModuleGuard+@RequireVendorModule('customer')). - Sidebar entry uses the same module; owners bypass module membership checks per Vendor overview.
Behavior
Section titled “Behavior”- List supports search, status filter, pagination, and optional store scope when creating/editing (empty store = vendor-wide / not scoped to one store — see UI copy “All stores / not scoped”).
code: optional on create/update. If omitted or sent empty, the API assigns a unique alphanumeric code (same character set as promo codes in shared UI helpers). Clearing the code on PATCH replaces it with a newly generated code.sort_order: still stored and used for list ordering on the server; the vendor dashboard form and list do not expose it (defaults apply).price_cents/duration_days: plan list price (minor units) and billing cycle length in days — stored as columns onmembership_products, not insidebenefits_json.benefits_jsonis a JSON array validated by the API for perks only (discounts, loyalty, free-delivery threshold, early-access tag). The vendor create/edit modal maps flat fields to these{ kind, value }rows.
APIs (web client)
Section titled “APIs (web client)”Implemented in apps/vendor-web/src/services/vendor-membership-products.api.ts:
| Method | Path | Purpose |
|---|---|---|
| GET | /vendor/membership-products | List (page, limit, search, status, store_id) |
| GET | /vendor/membership-products/:id | Detail |
| POST | /vendor/membership-products | Create |
| PATCH | /vendor/membership-products/:id | Update |
| DELETE | /vendor/membership-products/:id | Delete |
The backend enforces that store_id (when present) belongs to the authenticated vendor.
Related
Section titled “Related”- Vendor membership program (spec) — chain-wide model, store scope, POS rules
- Membership playbook — benefit kinds, checklist, QA matrix
- Customers (Vendor) — CRM list and profiles
- Membership subscriptions (Vendor) — link customers to these plans
- Membership products (Admin) — platform vendor (SaaS) catalog
- Vendor panel overview