WAKATODOCS

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.

ParameterTypeRequiredDescription
subscription_idstringyes
actioncancel_at_period_end | cancel_now | resumeyes

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.

ParameterTypeRequiredDescription
recipient_namestringyes
recipient_emailstringyes
line_itemsobject[]yes
tax_centsnumber
due_datestringYYYY-MM-DD
notesstring
contact_idstringOptional space contact to link for Contact 360.
sendbooleantrue = send immediately instead of leaving a draft.

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.

ParameterTypeRequiredDescription
titlestringyes
amount_centsnumberyes
currencystring3-letter code, default usd.
link_typeone_time | subscription
billing_intervalday | week | month | year
billing_interval_countnumber
descriptionstring
success_messagestring
redirect_urlstring
require_signinboolean

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}.

ParameterTypeRequiredDescription
titlestringyes
descriptionstring
short_descriptionstring
pricenumberWhole currency units (19.99 = $19.99). 0 or is_free for free products.
is_freeboolean
listing_typeproduct | service
product_typedigital | physicalphysical = shippable (stock + shipping); digital = default.
thumbnail_urlstring
imagesstring[]Gallery image URLs (first is used as thumbnail if none set).
tagsstring[]
inventory_quantitynumberStock on hand (physical only).
shipping_fee_centsnumberFlat shipping fee in CENTS (physical only; 0 = free).
require_signinbooleanRequire 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_spaceboolean
agent_discoverablebooleanAgentic discovery — expose this product to EXTERNAL AI shopping agents + Wakato's public product feed (commerce-feed). Omit to inherit the space default.
agent_checkout_enabledbooleanAgentic 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).
brandstringBrand for the product feed (defaults to the store name).
gtinstringGTIN/UPC/EAN barcode (optional; omit for digital/handmade goods).
google_product_categorystringGoogle product-taxonomy category, e.g. 'Apparel & Accessories > Clothing' (optional).
conditionnew | used | refurbishedItem 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.

ParameterTypeRequiredDescription
order_idstringyes
tracking_numberstringyes
carrierstringyes

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.

ParameterTypeRequiredDescription
order_idstringyes

get_product

Scope: commerce:read

Get one product from the connected commerce account, with whether it's listed on this space's pages.

ParameterTypeRequiredDescription
product_idstringyes

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.

ParameterTypeRequiredDescription
limitnumber

list_invoices

Scope: commerce:read

List the connected commerce account's invoices (status: draft|sent|viewed|paid|overdue|void).

ParameterTypeRequiredDescription
statusdraft | sent | viewed | paid | overdue | void
limitnumber
offsetnumber

list_orders

Scope: commerce:read

List the connected commerce account's marketplace orders (amount, status, fulfillment, product).

ParameterTypeRequiredDescription
statuspending | paid | delivered | completed | refunded | disputed
limitnumber
offsetnumber

Scope: commerce:read

List the connected commerce account's payment links with their public pay_url.

ParameterTypeRequiredDescription
statusactive | inactive | archived
limitnumber

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).

ParameterTypeRequiredDescription
product_idstringyes

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.

ParameterTypeRequiredDescription
statusdraft | active | paused | archived
searchstringFilter by title (case-insensitive contains).
limitnumber
offsetnumber

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).

ParameterTypeRequiredDescription
statusactive | past_due | canceled
limitnumber

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.

ParameterTypeRequiredDescription
invoice_idstringyes

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.

ParameterTypeRequiredDescription
order_idstringyes
amount_centsnumberPartial refund amount in cents; omit for a full refund.
reasonstring

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.

ParameterTypeRequiredDescription
invoice_idstringyes

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.

ParameterTypeRequiredDescription
colorPrimarystringButtons/accents, hex e.g. #C9A227
colorBackgroundstringSurface background, hex
colorTextstringBody text, hex
colorDangerstringError text, hex
fontFamilystringe.g. "Inter, sans-serif"
borderRadiusstringe.g. 12px
logoUrlstringhttps logo shown on checkout
clearbooleanRevert 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.

ParameterTypeRequiredDescription
shell_htmlstringThe checkout layout HTML (presentational only)
clearbooleanRevert 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.

ParameterTypeRequiredDescription
template_htmlstringCard template HTML with {{...}} tokens (must include {{buy}})
clearbooleanRevert 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.

ParameterTypeRequiredDescription
product_idstringyes
listedbooleanyes

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.

ParameterTypeRequiredDescription
product_idstringyes
option_typesobject[]
variantsobject[]

Scope: commerce:write

Edit a payment link's title/description/status (active|inactive|archived — inactive stops accepting money).

ParameterTypeRequiredDescription
payment_link_idstringyes
titlestring
descriptionstring
success_messagestring
redirect_urlstring
require_signinboolean
statusactive | 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.

ParameterTypeRequiredDescription
product_idstringyes
titlestring
descriptionstring
short_descriptionstring
pricenumber
is_freeboolean
thumbnail_urlstring
imagesstring[]
tagsstring[]
inventory_quantitynumberStock on hand (physical). null = untracked.
shipping_fee_centsnumberFlat shipping fee in CENTS.
require_signinbooleanRequire a Wakato account to buy (no guest checkout).
statusdraft | active | paused | archived
is_publishedboolean
agent_discoverablebooleanAgentic discovery — expose this product to external AI shopping agents + the public product feed.
agent_checkout_enabledbooleanAgentic checkout — let shopping agents complete the purchase. false = discover-only.
brandstringBrand for the product feed (empty to clear).
gtinstringGTIN/UPC/EAN barcode (empty to clear).
google_product_categorystringGoogle product-taxonomy category (empty to clear).
conditionnew | used | refurbished

void_invoice

Scope: commerce:write

Void an unpaid invoice and deactivate its pay link so it stops accepting money.

ParameterTypeRequiredDescription
invoice_idstringyes

On this page