create_order
Create an order. Server computes all amounts (never send prices). Requires Idempotency-Key (header Idempotency-Key or body idempotency_key) so retries never double-order. Returns pay_url + render_hint ("qrcode" for desktop hosts, show QR; mobile hosts may redirect). Payment is WeChat; user pays via their own WeChat.
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": {
"merchant_id": "<merchant_id>",
"product_id": "<product_id>",
"qty": "<qty>",
"receiver": "<receiver>"
},
"name": "create_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | Yes | ||
| receiver | Yes | ||
| user_ref | No | your stable anonymized user id (for pickup quota & risk) | |
| max_price | No | optional unit-price guard in CNY cents; order is rejected if unit price exceeds it | |
| product_id | Yes | ||
| merchant_id | Yes | ||
| idempotency_key | No | stable per-intent key; retries with the same key return the same order |