Skip to main content
Glama

Pay Order

pay_order
Destructive

Create a payment request for a booking owned by the authenticated account. CNY WeChat Pay and Alipay return a one-time device-aware payment link. 支付宝AI付 returns prepay_id and expires_at for Qwen batchPay; requires the user's cashier confirmation and server-side order status verification. Configure a valid TourMind user_key in a trusted local Skill or client integration that supplies the user_key tool argument. Do not ask users to paste user keys into chat. 普通 ToC 酒店查询可匿名,user_key 可选;下单、订单查询、取消和支付需要客户端安全配置的 user_key。 先查询订单,仅在待支付且用户确认支付方式、币种、订单原价、优惠券抵扣、应付总额及 Stripe 另收手续费后发起。生成链接/预支付信息不表示支付成功,需用户完成收银台并查询订单核实。超时或状态不明先查订单,不自动重复支付。支付宝AI付仅适用于支持千问 batchPay 的客户端。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "user_key": "<user_key>",
      "agent_ref_id": "<agent_ref_id>",
      "payment_method": "<payment_method>"
    },
    "name": "pay_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
user_keyYes由可信本地客户端配置的 TourMind 用户凭证;勿让用户在聊天中粘贴。普通 ToC 查询可省略,订单/支付操作必填;OAuth 与 ToB 不接受此字段。
agent_ref_idYescreate_booking 返回的 TourMind 订单号,必须属于当前鉴权用户;不是酒店确认号或第三方支付订单号。
payment_methodYes精确枚举:Stripe、微信支付、支付宝、支付宝AI付。后三种仅 CNY;支付宝AI付需千问原生收银台,返回 prepay_id,不是可点击支付链接。

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / description
      Previous value: -"返回字段说明(不增加校验约束;缺失、零值和 null 按各字段说明解释):\n返回值 [object] 必有字段=ok: 业务响应信封;字段缺失表示没有提供,不能自动补零。数组的 null 与 [] 都不含条目,但 null 不承诺完成了该部分查询。\n返回值.data [object]: 按 payment_method 区分支付结果。应付金额见 Stripe payable_amount;微信/支付宝以订单及收银台为准。必须查询订单确认支付结果。\n返回值.data 的分支 1:\n返回值.data [object] 必有字段=agent_ref_id,payment_method,pay_url,message,expires_at,one_time: 微信/支付宝支付链接。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.expires_at [string]: 支付链接到期时间 RFC3339,含时区。\n返回值.data.message [string]: 支付操作说明。\n返回值.data.one_time [boolean] 取值=[true]: 支付链接只可使用一次。\n返回值.data.pay_url [string]: 用户完成支付的 URL;生成链接不代表付款成功。支付宝AI付为空字符串,使用 prepay_id 调起专用收银台。\n返回值.data.payment_method [string] 取值=[\"微信支付\",\"支付宝\"]: 仅 CNY 订单支持。\n返回值.data 的分支 2:\n返回值.data [object] 必有字段=agent_ref_id,payment_method,pay_url,message,request_id,third_party_order_no,order_amount,stripe_payment_fee: Stripe 支付链接及费用。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.message [string]: 支付操作说明。\n返回值.data.order_amount [number]: 全部房间、整段入住的订单总价,使用对应币种主单位(如 CNY 元),不是分;未包含另列的 Stripe 手续费,酒店到店收取费用以政策及 exclusions 为准。\n返回值.data.pay_url [string]: 用户完成支付的 URL;生成链接不代表付款成功。支付宝AI付为空字符串,使用 prepay_id 调起专用收银台。\n返回值.data.payment_method [string] 取值=[\"Stripe\"]: Stripe 信用卡支付。\n返回值.data.request_id [string]: 支付服务请求 ID,用于关联支付请求。\n返回值.data.stripe_payment_fee [object] 必有字段=fee_rate,fee_amount,payable_amount,currency,notice: Stripe 另收手续费及含手续费的应付金额。\n返回值.data.stripe_payment_fee.currency [string]: 金额币种 ISO 4217。\n返回值.data.stripe_payment_fee.fee_amount [number]: Stripe 手续费金额,currency 主单位,已经按服务端精度取整。\n返回值.data.stripe_payment_fee.fee_rate [number]: 手续费比例,当前 0.035 即 3.5%。\n返回值.data.stripe_payment_fee.notice [string]: 费用来源及用途说明。\n返回值.data.stripe_payment_fee.payable_amount [number]: 订单金额加 Stripe 手续费后的实际应付总额,currency 主单位;尚未支付。\n返回值.data.third_party_order_no [string]: 支付平台订单号,与 TourMind 订单号不同。\n返回值.data 的分支 3:\n返回值.data [object] 必有字段=agent_ref_id,payment_method,pay_url,message,request_id,third_party_order_no,prepay_id,expires_at: 支付宝AI付预支付信息。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.expires_at [string]: 预支付信息到期时间 RFC3339,含时区。\n返回值.data.message [string]: 支付操作说明。\n返回值.data.pay_url [string] 取值=[\"\"]: 用户完成支付的 URL;生成链接不代表付款成功。支付宝AI付为空字符串,使用 prepay_id 调起专用收银台。\n返回值.data.payment_method [string] 取值=[\"支付宝AI付\"]: 仅 CNY,千问原生收银台。\n返回值.data.prepay_id [string]: 千问 batchPay 所需预支付标识,不是成功付款凭证。\n返回值.data.request_id [string]: 支付服务请求 ID,用于关联支付请求。\n返回值.data.third_party_order_no [string]: 支付平台订单号,与 TourMind 订单号不同。\n返回值.error [string]: 业务失败说明,不作为可重试或成功的唯一依据。\n返回值.error_code [string]: 鉴权等机器可读错误码,仅在错误路径提供。\n返回值.ok [boolean]: 业务是否成功。false 时读取 error/reason;工具执行错误也可能通过 MCP isError 返回而没有 structuredContent。\n返回值.reason [string] 取值=[\"invalid_request\",\"hotel_not_found\",\"upstream_timeout\",\"upstream_error\",\"hotel_detail_unavailable\"]: 失败原因:invalid_request=参数无效,hotel_not_found=酒店不存在,upstream_timeout=上游超时,upstream_error=上游失败,hotel_detail_unavailable=酒店详情不可用。成功空结果的 no_matching_live_room 位于 data.reason;批量逐项判断,不把一项失败当成整批失败。\n返回值 的分支 1:\n返回值 必有字段=data\n返回值.ok 取值=[true]\n返回值 的分支 2:\n返回值 必有字段=error,reason\n返回值.ok 取值=[false]\n"New value: +"返回字段说明(不增加校验约束;缺失、零值和 null 按各字段说明解释):\n返回值 [object] 必有字段=ok: 业务响应信封;字段缺失表示没有提供,不能自动补零。数组的 null 与 [] 都不含条目,但 null 不承诺完成了该部分查询。\n返回值.data [object]: 按 payment_method 区分支付结果。各支付方式均返回原价、优惠券抵扣及含适用手续费的应付金额;微信/支付宝点击链接时会重新校验订单,金额变更需重新确认。必须查询订单确认支付结果。\n返回值.data 的分支 1:\n返回值.data [object] 必有字段=agent_ref_id,payment_method,pay_url,message,expires_at,one_time,order_amount,discount_amount,payable_amount,currency: 微信/支付宝支付链接。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.currency [string]: 上述金额的币种 ISO 4217。\n返回值.data.discount_amount [number]: 当前订单优惠券实际抵扣金额,currency 主单位;无券为 0。\n返回值.data.expires_at [string]: 支付链接到期时间 RFC3339,含时区。\n返回值.data.message [string]: 支付操作说明。\n返回值.data.one_time [boolean] 取值=[true]: 支付链接只可使用一次。\n返回值.data.order_amount [number]: 订单原价,currency 主单位,未扣优惠券且不含支付手续费。\n返回值.data.pay_url [string]: 用户完成支付的 URL;生成链接不代表付款成功。支付宝AI付为空字符串,使用 prepay_id 调起专用收银台。\n返回值.data.payable_amount [number]: 本次应付总额,currency 主单位,已扣优惠券并包含适用支付手续费;Stripe 与 stripe_payment_fee.payable_amount 一致。\n返回值.data.payment_method [string] 取值=[\"微信支付\",\"支付宝\"]: 仅 CNY 订单支持。\n返回值.data 的分支 2:\n返回值.data [object] 必有字段=agent_ref_id,payment_method,pay_url,message,request_id,third_party_order_no,order_amount,discount_amount,payable_amount,currency,stripe_payment_fee: Stripe 支付链接及费用。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.currency [string]: 上述金额的币种 ISO 4217。\n返回值.data.discount_amount [number]: 当前订单优惠券实际抵扣金额,currency 主单位;无券为 0。\n返回值.data.message [string]: 支付操作说明。\n返回值.data.order_amount [number]: 订单原价,currency 主单位,未扣优惠券且不含支付手续费。\n返回值.data.pay_url [string]: 用户完成支付的 URL;生成链接不代表付款成功。支付宝AI付为空字符串,使用 prepay_id 调起专用收银台。\n返回值.data.payable_amount [number]: 本次应付总额,currency 主单位,已扣优惠券并包含适用支付手续费;Stripe 与 stripe_payment_fee.payable_amount 一致。\n返回值.data.payment_method [string] 取值=[\"Stripe\"]: Stripe 信用卡支付。\n返回值.data.request_id [string]: 支付服务请求 ID,用于关联支付请求。\n返回值.data.stripe_payment_fee [object] 必有字段=fee_rate,fee_amount,payable_amount,currency,notice: Stripe 另收手续费及含手续费的应付金额。\n返回值.data.stripe_payment_fee.currency [string]: 金额币种 ISO 4217。\n返回值.data.stripe_payment_fee.fee_amount [number]: Stripe 手续费金额,currency 主单位,已经按服务端精度取整。\n返回值.data.stripe_payment_fee.fee_rate [number]: 手续费比例,当前 0.035 即 3.5%。\n返回值.data.stripe_payment_fee.notice [string]: 费用来源及用途说明。\n返回值.data.stripe_payment_fee.payable_amount [number]: 订单金额加 Stripe 手续费后的实际应付总额,currency 主单位;尚未支付。\n返回值.data.third_party_order_no [string]: 支付平台订单号,与 TourMind 订单号不同。\n返回值.data 的分支 3:\n返回值.data [object] 必有字段=agent_ref_id,payment_method,pay_url,message,request_id,third_party_order_no,prepay_id,expires_at,order_amount,discount_amount,payable_amount,currency: 支付宝AI付预支付信息。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.currency [string]: 上述金额的币种 ISO 4217。\n返回值.data.discount_amount [number]: 当前订单优惠券实际抵扣金额,currency 主单位;无券为 0。\n返回值.data.expires_at [string]: 预支付信息到期时间 RFC3339,含时区。\n返回值.data.message [string]: 支付操作说明。\n返回值.data.order_amount [number]: 订单原价,currency 主单位,未扣优惠券且不含支付手续费。\n返回值.data.pay_url [string] 取值=[\"\"]: 用户完成支付的 URL;生成链接不代表付款成功。支付宝AI付为空字符串,使用 prepay_id 调起专用收银台。\n返回值.data.payable_amount [number]: 本次应付总额,currency 主单位,已扣优惠券并包含适用支付手续费;Stripe 与 stripe_payment_fee.payable_amount 一致。\n返回值.data.payment_method [string] 取值=[\"支付宝AI付\"]: 仅 CNY,千问原生收银台。\n返回值.data.prepay_id [string]: 千问 batchPay 所需预支付标识,不是成功付款凭证。\n返回值.data.request_id [string]: 支付服务请求 ID,用于关联支付请求。\n返回值.data.third_party_order_no [string]: 支付平台订单号,与 TourMind 订单号不同。\n返回值.error [string]: 业务失败说明,不作为可重试或成功的唯一依据。\n返回值.error_code [string]: 鉴权等机器可读错误码,仅在错误路径提供。\n返回值.ok [boolean]: 业务是否成功。false 时读取 error/reason;工具执行错误也可能通过 MCP isError 返回而没有 structuredContent。\n返回值.reason [string] 取值=[\"invalid_request\",\"hotel_not_found\",\"upstream_timeout\",\"upstream_error\",\"hotel_detail_unavailable\"]: 失败原因:invalid_request=参数无效,hotel_not_found=酒店不存在,upstream_timeout=上游超时,upstream_error=上游失败,hotel_detail_unavailable=酒店详情不可用。成功空结果的 no_matching_live_room 位于 data.reason;批量逐项判断,不把一项失败当成整批失败。\n返回值 的分支 1:\n返回值 必有字段=data\n返回值.ok 取值=[true]\n返回值 的分支 2:\n返回值 必有字段=error,reason\n返回值.ok 取值=[false]\n"
  2. Changed4 schema fields changed
    • changedInput schema / properties / agent_ref_id / description
      Previous value: -"TourMind booking reference"New value: +"create_booking 返回的 TourMind 订单号,必须属于当前鉴权用户;不是酒店确认号或第三方支付订单号。"
    • changedInput schema / properties / payment_method / description
      Previous value: -"Payment method: Stripe, 微信支付, 支付宝, or 支付宝AI付 (Qwen native cashier; returns prepay_id, not pay_url)"New value: +"精确枚举:Stripe、微信支付、支付宝、支付宝AI付。后三种仅 CNY;支付宝AI付需千问原生收银台,返回 prepay_id,不是可点击支付链接。"
    • changedInput schema / properties / user_key / description
      Previous value: -"TourMind user key required for authenticated ToC payment"New value: +"由可信本地客户端配置的 TourMind 用户凭证;勿让用户在聊天中粘贴。普通 ToC 查询可省略,订单/支付操作必填;OAuth 与 ToB 不接受此字段。"
    • addedOutput schema / description
      Added value: +"返回字段说明(不增加校验约束;缺失、零值和 null 按各字段说明解释):\n返回值 [object] 必有字段=ok: 业务响应信封;字段缺失表示没有提供,不能自动补零。数组的 null 与 [] 都不含条目,但 null 不承诺完成了该部分查询。\n返回值.data [object]: 按 payment_method 区分支付结果。应付金额见 Stripe payable_amount;微信/支付宝以订单及收银台为准。必须查询订单确认支付结果。\n返回值.data 的分支 1:\n返回值.data [object] 必有字段=agent_ref_id,payment_method,pay_url,message,expires_at,one_time: 微信/支付宝支付链接。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.expires_at [string]: 支付链接到期时间 RFC3339,含时区。\n返回值.data.message [string]: 支付操作说明。\n返回值.data.one_time [boolean] 取值=[true]: 支付链接只可使用一次。\n返回值.data.pay_url [string]: 用户完成支付的 URL;生成链接不代表付款成功。支付宝AI付为空字符串,使用 prepay_id 调起专用收银台。\n返回值.data.payment_method [string] 取值=[\"微信支付\",\"支付宝\"]: 仅 CNY 订单支持。\n返回值.data 的分支 2:\n返回值.data [object] 必有字段=agent_ref_id,payment_method,pay_url,message,request_id,third_party_order_no,order_amount,stripe_payment_fee: Stripe 支付链接及费用。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.message [string]: 支付操作说明。\n返回值.data.order_amount [number]: 全部房间、整段入住的订单总价,使用对应币种主单位(如 CNY 元),不是分;未包含另列的 Stripe 手续费,酒店到店收取费用以政策及 exclusions 为准。\n返回值.data.pay_url [string]: 用户完成支付的 URL;生成链接不代表付款成功。支付宝AI付为空字符串,使用 prepay_id 调起专用收银台。\n返回值.data.payment_method [string] 取值=[\"Stripe\"]: Stripe 信用卡支付。\n返回值.data.request_id [string]: 支付服务请求 ID,用于关联支付请求。\n返回值.data.stripe_payment_fee [object] 必有字段=fee_rate,fee_amount,payable_amount,currency,notice: Stripe 另收手续费及含手续费的应付金额。\n返回值.data.stripe_payment_fee.currency [string]: 金额币种 ISO 4217。\n返回值.data.stripe_payment_fee.fee_amount [number]: Stripe 手续费金额,currency 主单位,已经按服务端精度取整。\n返回值.data.stripe_payment_fee.fee_rate [number]: 手续费比例,当前 0.035 即 3.5%。\n返回值.data.stripe_payment_fee.notice [string]: 费用来源及用途说明。\n返回值.data.stripe_payment_fee.payable_amount [number]: 订单金额加 Stripe 手续费后的实际应付总额,currency 主单位;尚未支付。\n返回值.data.third_party_order_no [string]: 支付平台订单号,与 TourMind 订单号不同。\n返回值.data 的分支 3:\n返回值.data [object] 必有字段=agent_ref_id,payment_method,pay_url,message,request_id,third_party_order_no,prepay_id,expires_at: 支付宝AI付预支付信息。\n返回值.data.agent_ref_id [string]: TourMind 订单号。\n返回值.data.expires_at [string]: 预支付信息到期时间 RFC3339,含时区。\n返回值.data.message [string]: 支付操作说明。\n返回值.data.pay_url [string] 取值=[\"\"]: 用户完成支付的 URL;生成链接不代表付款成功。支付宝AI付为空字符串,使用 prepay_id 调起专用收银台。\n返回值.data.payment_method [string] 取值=[\"支付宝AI付\"]: 仅 CNY,千问原生收银台。\n返回值.data.prepay_id [string]: 千问 batchPay 所需预支付标识,不是成功付款凭证。\n返回值.data.request_id [string]: 支付服务请求 ID,用于关联支付请求。\n返回值.data.third_party_order_no [string]: 支付平台订单号,与 TourMind 订单号不同。\n返回值.error [string]: 业务失败说明,不作为可重试或成功的唯一依据。\n返回值.error_code [string]: 鉴权等机器可读错误码,仅在错误路径提供。\n返回值.ok [boolean]: 业务是否成功。false 时读取 error/reason;工具执行错误也可能通过 MCP isError 返回而没有 structuredContent。\n返回值.reason [string] 取值=[\"invalid_request\",\"hotel_not_found\",\"upstream_timeout\",\"upstream_error\",\"hotel_detail_unavailable\"]: 失败原因:invalid_request=参数无效,hotel_not_found=酒店不存在,upstream_timeout=上游超时,upstream_error=上游失败,hotel_detail_unavailable=酒店详情不可用。成功空结果的 no_matching_live_room 位于 data.reason;批量逐项判断,不把一项失败当成整批失败。\n返回值 的分支 1:\n返回值 必有字段=data\n返回值.ok 取值=[true]\n返回值 的分支 2:\n返回值 必有字段=error,reason\n返回值.ok 取值=[false]\n"
  3. Changed1 schema field changed
    • changedInput schema / properties / payment_method / description
      Previous value: -"Payment method: Stripe, 微信支付, or 支付宝"New value: +"Payment method: Stripe, 微信支付, 支付宝, or 支付宝AI付 (Qwen native cashier; returns prepay_id, not pay_url)"
  4. Changed1 schema field changed
    • changedInput schema / properties / user_key / description
      Previous value: -"TourMind user key required for authenticated ToC booking operations"New value: +"TourMind user key required for authenticated ToC payment"
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag readOnlyHint=false and destructiveHint=true, and the description goes well beyond them: links are one-time and device-aware, Alipay AI pay returns prepay_id plus expires_at rather than a clickable link, generating a link does not mean payment succeeded, the user must complete the cashier and the server must verify order status. It also names the client-compatibility limit for Qwen batchPay.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the sequencing of instructions is logical, but the definition is long and partly bilingual duplication — the user_key configuration rule and the 'do not paste keys in chat' warning appear in both English and Chinese, and the payment-method return behavior is restated in the parameter notes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a destructive, open-world payment tool with an output schema, the definition covers everything an agent needs: authentication prerequisites, mandatory pre-query verification, confirmation checklist, success-vs-link semantics, failure/timeout handling, and client compatibility. Return-value details are rightly left to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already carries most parameter meaning. The description still adds operational constraints the schema does not: the user_key must come from a trusted local Skill/client configuration, ToC hotel queries may omit it while order/payment operations require it, and Alipay AI pay is only valid on clients supporting Qwen batchPay.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a precise verb and resource: 'Create a payment request for a booking owned by the authenticated account.' It then delineates what each payment method returns, which distinguishes this tool from read-side siblings like query_booking and from the lifecycle siblings cancel_booking/create_booking.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states explicit preconditions (query the order first; only proceed when status is pending payment and the user has confirmed method, currency, original price, coupon deduction, total payable, and Stripe's extra fee) and explicit non-usage rules (do not auto-retry on timeout or unknown status; do not ask users to paste user keys in chat). Guidance that specific is rare.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.