hou_tea_list_my_orders
List your USDC/x402 orders using your buyer list token, no merchant API key needed.
Instructions
[core] List USDC/x402 orders associated with the buyer_list_token (returned from a successful purchase or stored in env HOU_TEA_BUYER_LIST_TOKEN). No merchant API key required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buyer_list_token | No | ||
| status | No | ||
| limit | No | ||
| offset | No |
Implementation Reference
- src/client.ts:207-231 (handler)The actual HTTP client implementation of listMyOrders — calls GET /api/v1/buyer/orders with Bearer token auth.
listMyOrders: async (p: ListMyOrdersParams = {}) => { const token = (p.buyer_list_token ?? BUYER_LIST_TOKEN).trim(); if (!token) { throw new Error( "buyer_list_token required: set env HOU_TEA_BUYER_LIST_TOKEN (from a successful buy response) or pass buyer_list_token to this tool." ); } const q = qs({ status: p.status, limit: p.limit, offset: p.offset, } as Record<string, unknown>); const url = `${DEFAULT_PAY_BASE}/api/v1/buyer/orders${q}`; const res = await fetch(url, { headers: { ...authHeaders(), Authorization: `Bearer ${token}`, }, }); if (!res.ok) { const text = await res.text().catch(() => ""); throw new HouTeaHttpError(res.status, url, text); } return (await res.json()) as unknown; }, - src/client.ts:108-114 (schema)ListMyOrdersParams interface — defines the input parameters (buyer_list_token, status, limit, offset).
export interface ListMyOrdersParams { /** Overrides `HOU_TEA_BUYER_LIST_TOKEN` for this call only. */ buyer_list_token?: string; status?: string; limit?: number; offset?: number; } - src/tools/registry.ts:267-282 (registration)Tool registration entry for hou_tea_list_my_orders in CORE_TOOLS array — includes name, group, inputSchema, and execute binding.
{ name: "hou_tea_list_my_orders", group: "core", summary: "List orders linked to buyer_list_token (Bearer auth).", description: "List USDC/x402 orders associated with the buyer_list_token (returned from a successful purchase or stored in env HOU_TEA_BUYER_LIST_TOKEN). No merchant API key required.", uiComponent: "OrderTimeline", inputSchema: obj({ buyer_list_token: { type: "string" }, status: { type: "string" }, limit: { type: "integer", minimum: 1, maximum: 100, default: 20 }, offset: { type: "integer", minimum: 0, default: 0 }, }), execute: (args) => houTea.listMyOrders(args as unknown as Parameters<typeof houTea.listMyOrders>[0]), }, - src/tools/registry.ts:256-262 (registration)nextAction reference from hou_tea_check_order — suggests calling hou_tea_list_my_orders after an order is confirmed/settled.
if (status === "confirmed" || status === "settled") { return [ { tool: "hou_tea_list_my_orders", reason: "Order confirmed; the buyer can now list / track their order history.", }, ]; - src/client.ts:20-38 (helper)buildBuyBody helper — auto-registers buyer_list_token for grouping orders, enabling list_my_orders functionality.
function buildBuyBody( product_name: string, unit_price: string, quantity: number ): Record<string, unknown> { const body: Record<string, unknown> = { product_name, unit_price, quantity, currency: "usdc", }; if (!AUTO_BUYER_LIST) return body; if (BUYER_LIST_TOKEN) { body.buyer_list_token = BUYER_LIST_TOKEN; } else { body.register_buyer_list_token = true; } return body; }