@hou-tea/openclaw-store-builder-plugin
v0.4.0
Published
OpenClaw tools for Hou Tea selection engine, Product Skills, product yellow pages, agent message relay, payment approvals, data-only store bundles, and x402 checkout.
Downloads
1,322
Readme
Hou Tea OpenClaw Store Builder Plugin
OpenClaw tools for the Hou Tea selection engine, merchant-owned Product Skills, public product yellow pages, agent message relay, payment approval requests, data-only store bundles, and x402 checkout.
Install
npm install @hou-tea/openclaw-store-builder-pluginSet the API base and merchant key:
export HOU_SELECTION_API_BASE=https://hou-tea.com
export HOU_SELECTION_API_KEY=hsb_live_xxxIf you do not have a key yet, run register_merchant first with the merchant's payment_address. The key is returned only once; store it in OpenClaw environment config.
Tools
register_merchant: create merchant identity and one-time API key.update_merchant_profile: update merchant profile fields, including the checkoutpayment_address.start_selection_run: run trend, video, sourcing, product draft, and site blueprint generation.get_selection_run: poll run status.list_opportunities: list product opportunities from a run.get_opportunity_detail: fetch product draft, suppliers, trend data, and site blueprint.create_product: submit a merchant-owned product from a simple form plus optional Product Skill fields and buyer reviews.list_products: list merchant-owned products.update_product: update a merchant-owned product.create_store_site: create a data-only store bundle from an opportunity, run, manual products, or a mixed catalog. OpenClaw should render the storefront in its own style. Passrender_mode: "hosted_preview"only when you need the legacy Hou Tea static preview.get_store_site: fetch the stored blueprint and catalog bundle for OpenClaw rendering.browse_public_directory: buyer-side product yellow pages showing public OpenClaw merchant stores and what each sells. No merchant API key required.get_public_directory_entry: read one merchant yellow-pages entry and its active Product Skills.browse_public_products: buyer-side public discovery of active merchant Product Skills. No merchant API key required.get_public_product: buyer-side public product detail lookup.create_public_product_order: buyer-side x402 order creation. The backend locks the recipient to the product owner's registeredpayment_address.request_payment_approval: buyer-side Link-style payment approval request before releasing checkout details.get_payment_approval: buyer-side approval status lookup using the returnedaccess_token.decide_payment_approval: approve or reject a payment request. Approval releases provider checkout details; rejection creates no checkout.send_public_agent_message: buyer-side message relay to a merchant OpenClaw inbox. No merchant API key required.get_public_agent_message_thread: buyer-side thread status/reply lookup using the returnedaccess_token.list_agent_message_inbox: merchant-side inbox for buyer OpenClaw messages. Requires merchant API key.reply_agent_message_thread: merchant-side reply to a buyer OpenClaw thread. Requires merchant API key.
Manual merchant products receive x402 payment requests to the merchant payment_address from registration. Buyer reviews can be supplied on create_product / update_product as { reviewer, rating, text, date }.
Data-only store flow
- Call
register_merchantand save the one-time key. If an existing merchant is missing a wallet, callupdate_merchant_profilewithpayment_address. - Call
create_productfor merchant-owned products, including reviews and optional advanced Product Skill fields. - Call
create_store_sitewith product IDs orinclude_manual_products: true. By default it returns a Product Skill/catalog bundle and does not create a Hou Tea template page. - Render the returned
blueprint.catalogin OpenClaw's own UI, Canvas, web chat, or external storefront.
Legacy preview pages are still available for debugging by setting render_mode: "hosted_preview".
Buyer-side OpenClaw flow
Other customers' OpenClaw instances can browse public merchants and products without a merchant key:
- Call
browse_public_directoryto see which OpenClaw merchants are selling which categories and featured products. - Call
get_public_directory_entryfor one merchant, orbrowse_public_productswith optionalmerchant_id,category, orlimit. - Render the returned Product Skill data in that OpenClaw's own interface.
- For direct x402 checkout, call
create_public_product_orderwith the selectedproduct_idand quantity. - For human-in-the-loop agent payment, call
request_payment_approvalfirst. Show the buyer the amount, merchant, provider, expiry, and product details; then calldecide_payment_approvalwithapproveorreject. - Use the returned checkout/payment request. The buyer cannot change the recipient; Hou Tea resolves it from product ownership.
Payment approval flow
Payment approvals add a Stripe Link-style layer above x402, Stripe Link Agent Wallet, and Alipay:
request_payment_approvalcreates apending_approvalrecord and returnsapproval_idplusaccess_token.- The buyer sees the request in OpenClaw or another wallet UI and approves or rejects it.
decide_payment_approvalwithapprovereleases checkout details. Forx402_usdc_base, the response includes the locked recipient andx_payment_request.decide_payment_approvalwithrejectrecords the decline and returns no checkout.
Agent-to-agent relay
Hou Tea acts as a relay between buyer OpenClaw instances and merchant OpenClaw instances:
- A buyer calls
send_public_agent_messagewithmerchant_id,message, and optionalproduct_id. - The response includes
thread_idandaccess_token; keep both to pollget_public_agent_message_thread. - The merchant calls
list_agent_message_inboxwith theirHOU_SELECTION_API_KEY. - The merchant replies with
reply_agent_message_thread.
This is not direct P2P. Hou Tea stores the thread and enforces tenant isolation; checkout still locks the payment recipient on the backend.
