Commerce
Space MCP tools in the Commerce scope (commerce). Reach these with a wks_live_ key over space-mcp or space-api.
Tools in the commerce scope, callable over space-mcp (tools/call) or space-api (REST) with a wks_live_* key that grants commerce.
control_subscription
Scope: commerce:write
Cancel or resume a customer's subscription. action: 'cancel_at_period_end' (graceful — keeps access until the period ends), 'cancel_now' (immediate — access revoked at once), or 'resume' (undo a scheduled cancel). subscription_id from list_subscriptions. Access grants are revoked automatically.
| Parameter | Type | Required | Description |
|---|---|---|---|
subscription_id | string | yes | |
action | cancel_at_period_end | cancel_now | resume | yes |
create_invoice
Scope: commerce:write
Create an invoice from the connected commerce account. line_items amounts are in CENTS (unit_amount_cents: 15000 = $150.00). Defaults to a draft; pass send:true to immediately number it and email the recipient (gapless INV-#### numbering, payment link auto-created). If the space configured a billing email address, it sends from that address.
| Parameter | Type | Required | Description |
|---|---|---|---|
recipient_name | string | yes | |
recipient_email | string | yes | |
line_items | object[] | yes | |
tax_cents | number | ||
due_date | string | YYYY-MM-DD | |
notes | string | ||
contact_id | string | Optional space contact to link for Contact 360. | |
send | boolean | true = send immediately instead of leaving a draft. |
create_payment_link
Scope: commerce:write
Create a shareable checkout link for the connected commerce account. amount_cents is in CENTS (1999 = $19.99). link_type one_time (default) or subscription (needs billing_interval). Returns pay_url to share. Requires the seller's Stripe payouts to be enabled.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | |
amount_cents | number | yes | |
currency | string | 3-letter code, default usd. | |
link_type | one_time | subscription | ||
billing_interval | day | week | month | year | ||
billing_interval_count | number | ||
description | string | ||
success_message | string | ||
redirect_url | string | ||
require_signin | boolean |
create_product
Scope: commerce:write
Create a product in the connected commerce account (starts as an unpublished draft). price is in whole currency units (e.g. 19.99). Set product_type:'physical' for shippable goods (then set inventory_quantity + shipping_fee_cents); default 'digital' has no stock/shipping. Set list_on_this_space:true to also put it in this space's storefront catalog so pages can render it via wakato.commerce.listProducts(). For size/color options use set_product_variants after creating. Go live with update_product {status:'active', is_published:true}.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | |
description | string | ||
short_description | string | ||
price | number | Whole currency units (19.99 = $19.99). 0 or is_free for free products. | |
is_free | boolean | ||
listing_type | product | service | ||
product_type | digital | physical | physical = shippable (stock + shipping); digital = default. | |
thumbnail_url | string | ||
images | string[] | Gallery image URLs (first is used as thumbnail if none set). | |
tags | string[] | ||
inventory_quantity | number | Stock on hand (physical only). | |
shipping_fee_cents | number | Flat shipping fee in CENTS (physical only; 0 = free). | |
require_signin | boolean | Require a Wakato account to buy (no guest checkout). Auto-enforced anyway for products that enrol the buyer in a hub/group or grant an entitlement. | |
list_on_this_space | boolean | ||
agent_discoverable | boolean | Agentic discovery — expose this product to EXTERNAL AI shopping agents + Wakato's public product feed (commerce-feed). Omit to inherit the space default. | |
agent_checkout_enabled | boolean | Agentic checkout — let shopping agents COMPLETE the purchase (not just find it). Defaults on with discovery; set false for discover-only (agent recommends, buyer checks out on your own site). | |
brand | string | Brand for the product feed (defaults to the store name). | |
gtin | string | GTIN/UPC/EAN barcode (optional; omit for digital/handmade goods). | |
google_product_category | string | Google product-taxonomy category, e.g. 'Apparel & Accessories > Clothing' (optional). | |
condition | new | used | refurbished | Item condition for the feed (default 'new'). |
fulfill_order
Scope: commerce:write
Mark a physical order shipped with tracking — notifies the buyer and starts the payout release window. order_id from list_orders; carrier e.g. USPS/UPS/FedEx/DHL.
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | string | yes | |
tracking_number | string | yes | |
carrier | string | yes |
get_checkout_design
Scope: commerce:read
Read how THIS space's storefront checkout + product cards are branded/authored: the checkout brand tokens, any custom checkout layout (shell), and any product-card template. Use before changing them.
get_commerce_feed
Scope: commerce:read
Get the PUBLIC agentic-commerce product-feed URLs for this space (JSON for AI shopping agents, XML for Google Merchant) plus how many products are currently discoverable. Share these so external AI agents (ChatGPT, Google) can find and sell the space's opted-in products. A product only appears when agent_discoverable is on AND it is active + published.
get_commerce_status
Scope: commerce:read
Check whether THIS space is set up to take payments, in plain terms — read this BEFORE telling anyone how to 'set up' or 'connect' payments. Returns stage (not_set_up | pending | ready), a summary to relay, and a next_step (null when ready). If it's already ready, there is nothing to set up. Never describe payment setup from memory, and never name the underlying payment provider — Wakato white-labels it.
get_order
Scope: commerce:read
Get one order from the connected commerce account.
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | string | yes |
get_product
Scope: commerce:read
Get one product from the connected commerce account, with whether it's listed on this space's pages.
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | string | yes |
list_buyers
Scope: commerce:read
Aggregated buyers of the connected commerce account: payment-link/invoice payers grouped by email with payment count and total. Payout balances are never exposed.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number |
list_invoices
Scope: commerce:read
List the connected commerce account's invoices (status: draft|sent|viewed|paid|overdue|void).
| Parameter | Type | Required | Description |
|---|---|---|---|
status | draft | sent | viewed | paid | overdue | void | ||
limit | number | ||
offset | number |
list_orders
Scope: commerce:read
List the connected commerce account's marketplace orders (amount, status, fulfillment, product).
| Parameter | Type | Required | Description |
|---|---|---|---|
status | pending | paid | delivered | completed | refunded | disputed | ||
limit | number | ||
offset | number |
list_payment_links
Scope: commerce:read
List the connected commerce account's payment links with their public pay_url.
| Parameter | Type | Required | Description |
|---|---|---|---|
status | active | inactive | archived | ||
limit | number |
list_product_variants
Scope: commerce:read
Read a product's option axes (e.g. Size, Color) and its concrete variants (each with price override + stock).
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | string | yes |
list_products
Scope: commerce:read
List the connected commerce account's products (title, price, status, whether each is listed on this space's storefront pages). Requires a commerce account connected to this space.
| Parameter | Type | Required | Description |
|---|---|---|---|
status | draft | active | paused | archived | ||
search | string | Filter by title (case-insensitive contains). | |
limit | number | ||
offset | number |
list_subscriptions
Scope: commerce:read
List the commerce account's recurring subscriptions (id, buyer, source, status, period end, cancel-at-period-end). Filter by status (active|past_due|canceled).
| Parameter | Type | Required | Description |
|---|---|---|---|
status | active | past_due | canceled | ||
limit | number |
mark_invoice_paid
Scope: commerce:write
Mark a SENT invoice as paid — for payments taken outside Wakato (cash, bank transfer, etc.). Fires the invoice-paid automation. The invoice must have been sent (not a draft) and not already paid/void. invoice_id from list_invoices.
| Parameter | Type | Required | Description |
|---|---|---|---|
invoice_id | string | yes |
refund_order
Scope: commerce:write
Refund a marketplace order to the buyer via the original payment (full, or partial with amount_cents in CENTS). ⚠️ Money leaves the business and can't be un-refunded. The order/payout status updates automatically once the refund settles. order_id from list_orders.
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | string | yes | |
amount_cents | number | Partial refund amount in cents; omit for a full refund. | |
reason | string |
send_invoice
Scope: commerce:write
Send (or re-send) an invoice: assigns the gapless number on first send, creates/reprices its payment link, emails the recipient, returns the pay_url.
| Parameter | Type | Required | Description |
|---|---|---|---|
invoice_id | string | yes |
set_checkout_branding
Scope: commerce:write
Brand THIS space's checkout so it matches the storefront page (colors, font, radius, logo) — themes both the inline checkout overlay and the /checkout page, including the secure Stripe payment field. Colors are hex (#RRGGBB); logoUrl must be https. Pass clear:true to revert to the default theme.
| Parameter | Type | Required | Description |
|---|---|---|---|
colorPrimary | string | Buttons/accents, hex e.g. #C9A227 | |
colorBackground | string | Surface background, hex | |
colorText | string | Body text, hex | |
colorDanger | string | Error text, hex | |
fontFamily | string | e.g. "Inter, sans-serif" | |
borderRadius | string | e.g. 12px | |
logoUrl | string | https logo shown on checkout | |
clear | boolean | Revert to the default theme |
set_checkout_layout
Scope: commerce:write
Author a custom checkout LAYOUT for this space (agent-designed chrome/copy — hero, headline, brand, trust badges, columns, footer). It WRAPS the platform's secure checkout — you NEVER draw card or checkout inputs yourself. Include exactly one <div data-wakato-stripe-slot></div>: the full secure checkout (product summary + fields + card field) mounts there. Optionally add <div data-wakato-summary-slot></div> to relocate the product summary into your design. Inline style= only; no <script>/<form>/<input>/class. Pass clear:true to revert to the default panel.
| Parameter | Type | Required | Description |
|---|---|---|---|
shell_html | string | The checkout layout HTML (presentational only) | |
clear | boolean | Revert to the default checkout panel |
set_product_card_template
Scope: commerce:write
Design the product CARD every listed product renders into on storefront pages (grids + single cards). Use tokens {{title}} {{price}} {{image}} {{description}} {{buy}} — {{buy}} is the platform's Buy button (you can't forge the checkout link). Inline style= only; no <script>/<form>/<input>/class. Pass clear:true to revert to the default card.
| Parameter | Type | Required | Description |
|---|---|---|---|
template_html | string | Card template HTML with {{...}} tokens (must include {{buy}}) | |
clear | boolean | Revert to the default product card |
set_product_listing
Scope: commerce:write
List (listed:true) or unlist (listed:false) a product on THIS space's storefront catalog — what pages render via wakato.commerce.listProducts(). Only live products (active + published) actually show to visitors.
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | string | yes | |
listed | boolean | yes |
set_product_variants
Scope: commerce:write
Define a product's options (e.g. Size, Color) and REPLACE its variants in one call. option_types is the axes [{name, values[]}]; variants is one entry per combination with options {axis:value}, optional price (whole currency units; omit/null = base price), inventory_quantity (null = untracked), sku, image_url. Send the FULL desired set each time (it replaces existing). Pass empty variants + null option_types to clear.
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | string | yes | |
option_types | object[] | ||
variants | object[] |
update_payment_link
Scope: commerce:write
Edit a payment link's title/description/status (active|inactive|archived — inactive stops accepting money).
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_link_id | string | yes | |
title | string | ||
description | string | ||
success_message | string | ||
redirect_url | string | ||
require_signin | boolean | ||
status | active | inactive | archived |
update_product
Scope: commerce:write
Edit a product: title, descriptions, price, images, tags, stock (inventory_quantity), shipping_fee_cents, status (draft|active|paused|archived) and is_published. To sell on this space's pages a product needs status:'active' AND is_published:true.
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | string | yes | |
title | string | ||
description | string | ||
short_description | string | ||
price | number | ||
is_free | boolean | ||
thumbnail_url | string | ||
images | string[] | ||
tags | string[] | ||
inventory_quantity | number | Stock on hand (physical). null = untracked. | |
shipping_fee_cents | number | Flat shipping fee in CENTS. | |
require_signin | boolean | Require a Wakato account to buy (no guest checkout). | |
status | draft | active | paused | archived | ||
is_published | boolean | ||
agent_discoverable | boolean | Agentic discovery — expose this product to external AI shopping agents + the public product feed. | |
agent_checkout_enabled | boolean | Agentic checkout — let shopping agents complete the purchase. false = discover-only. | |
brand | string | Brand for the product feed (empty to clear). | |
gtin | string | GTIN/UPC/EAN barcode (empty to clear). | |
google_product_category | string | Google product-taxonomy category (empty to clear). | |
condition | new | used | refurbished |
void_invoice
Scope: commerce:write
Void an unpaid invoice and deactivate its pay link so it stops accepting money.
| Parameter | Type | Required | Description |
|---|---|---|---|
invoice_id | string | yes |