目录 / Travel Consultant
Travel Consultant
--- name: xianzong-travel-aipay description: >- Xianzong Wendao Travel Consultation: one line of requirements becomes a ready-to-use custom itinerary with PDF delivery (CNY 0.99 / approx USD 0.15 per call, Alipay AI pay-per-use). Use for travel plans, itineraries or trip guides - family trips with kids, elderly parents, group trips, outbound travel, budget planning, transport or lodging advice; or when the user mentions "Xianzong Wendao", "travel consultation", "PDF itinerary" or "plan a trip for a few days". Body text supports English and other languages via `language`; PDF cover labels and the email are Chinese only. Output: a 7-section itinerary with itemized budgets, ticketing constraints, rest windows, stamina fallbacks and alternatives for rain, sold-out tickets, closures or delays; Markdown plus a typeset PDF (cover, contents, footer, 90-day link) emailed to the user. Payment: an Alipay QR code the user scans to confirm (AI Pay), handled by the official alipay-payment-skill / alipay-bot over HTTP 402; this Skill never implements payment or signing. metadata: version: "1.3.0" category: travel vendor: "仙踪问道" requires: bins: ["node", "alipay-bot"] node: ">=18" env: [] pricing: amount_cny: "0.99" goods_name: "仙踪问道_旅行咨询" service_id: "API_7D36D49749854F1F" endpoint: "https://api.riyuexinzhu.com/aipay/travel_consultant" --- # Xianzong Wendao · Travel Consultation > **CNY 0.99 (approx USD 0.15) turns a vague travel idea into an itinerary you can follow as written.** > More than "where to go": how to get there, what it costs, and how to adjust when you are > tired / it rains / the tickets sold out — all in the same document. > Say "where, how many days, who is coming, what budget", and minutes later you get an > executable day-by-day itinerary, an itemized budget with transport and lodging advice, and > a typeset PDF with cover and table of contents. ## What you get | Deliverable | Details | |---|---| | **Day-by-day itinerary** (Markdown) | Where to go each day, how long to stay, how to connect, what to eat, which area to stay in, roughly how much it costs | | **Typeset PDF plan** | Cover (running head + your question + destination / travel dates / delivered-by cards) + table of contents + body + branded footer with the official site; ~90-day download link, also emailed to the address you provide | | **Reference material** (optional) | Destination knowledge-base items on attractions, food, transport, lodging, history and culture; returned by default | One consultation covers **one trip** (one destination and one time window); consult separately for different trips. ## Two real delivery samples Before paying you can open the two PDFs below. Both are **actual deliveries** from the same generation and typesetting pipeline as a paid consultation — judge for yourself whether they are ready to use, then decide whether to consult. | Sample | Scenario | Link | |---|---|---| | **Beijing · 4 days / 3 nights, autumn-break family trip** | Two adults and one 8-year-old, autumn-break trip to Beijing (Great Wall, Universal Studios, Forbidden City central axis) | [Travel plan - Beijing (PDF)](https://ai-agency-dev.oss-cn-beijing.aliyuncs.com/static_files/samples/aipay/%E6%97%85%E8%A1%8C%E5%92%A8%E8%AF%A2%E6%96%B9%E6%A1%88_%E5%8C%97%E4%BA%AC.pdf) | | **UK · 9 days, Spring Festival family trip** | Two adults and one 8-year-old, Spring Festival trip to the UK (6 nights in London + 1 night in York) | [Travel plan - UK (PDF)](https://ai-agency-dev.oss-cn-beijing.aliyuncs.com/static_files/samples/aipay/%E6%97%85%E8%A1%8C%E5%92%A8%E8%AF%A2%E6%96%B9%E6%A1%88_%E8%8B%B1%E5%9B%BD.pdf) | Both samples show, directly: the cover (question / destination / dates / delivered by), the table of contents, time-block-level day plans, the itemized budget table, the pre-trip verification checklist, and the closing "this report was generated by AI..." notice. **What is inside the PDF is everything one consultation produces** — there are no hidden sections. ### The difference in one sentence > **It does not just recommend where to go — it works out how to get there, what it costs, and how to adjust when you are tired / it rains / the tickets sold out.** The gap is not "more attractions, longer text" but **more complete execution detail**: itinerary, budget, rest plan and contingency handling live in the same document, so you do not have to research the rest yourself. | Strength | What it actually does (verifiable line by line in the samples above) | |---|---| | **An itinerary you can execute** | Daily route + transport connections + lodging area + booking reminders, down to **departure times**, the **reason** for each stop's order, and how far ahead to book | | **A budget you can read** | **Itemized budget table** (transport / lodging / tickets / food priced separately) stating head count, nights, child pricing rule and FX basis, plus a "recalculation method" so you can re-price it yourself | | **Family detail** | **Attraction selection by age and height** (anything below the height limit is skipped outright), **mandatory rest windows**, a cap on continuous walking, and shortened routes for low stamina | | **Contingencies covered** | Concrete fallbacks for rain, sold-out tickets, temporary closures, a tired child and transport delays, with a clear mark on what must be verified in advance | ### Compared dimension by dimension with a generic AI itinerary A generic AI can also produce an itinerary, but most stop at the "suggestion layer" (attraction list + rough order + vague days); this service delivers the "execution layer". Every line below can be checked in the sample PDFs: | Dimension | Where generic AI usually stops | This service (see the two samples above) | |---|---|---| | **Assumptions and prerequisites** | Basic context such as head count, ages and season, plus some selection suggestions | Two dedicated opening sections: **"5 things to confirm before you go" + "assumptions of this plan"** — holiday start/end, flight branches (two distinct walks for branch A / branch B), FX basis, whether the budget includes long-haul travel, walking ability of the adults; plus what to adjust if an assumption changes | | **Itinerary execution** | Time blocks, attractions, visit durations and reminders | Additionally **departure times, transport mode and duration, the exact walking route, and rest locations**: leave at 07:30 (60-120 min each way; public transport not recommended with a child), change to the shuttle bus at 09:30, walk only towers 14 to 16 between 10:00 and 11:30 | | **Tickets and admission** | Reminders about reservations and opening hours | Written as **hard constraints**: the Forbidden City closes on Mondays, tickets drop 7 days ahead at 20:00, **no on-site sales**, under-18s are free but still need a zero-fare reservation; Universal Studios ride **height limits** (122 cm / 132 cm) and the skip strategy when the queue exceeds the limit | | **Family suitability** | Reminders to take a midday break, cut attractions when the child is tired, plus interactive play ideas | Rest is pinned to **specific time blocks** (Day 3, 13:00-14:00 mandatory rest with no attractions scheduled), continuous walking or standing time is stated, **early-exit conditions** for a tired child are defined, and child-motivating play is suggested ("reach tower 16 and you win") | | **Budget transparency** | Usually a rough per-person figure, or a few money-saving tips | **A complete itemized budget table**: lodging / transport / tickets / food / visa line by line, with head count, nights, child pricing and what is included; any single line can be re-priced | | **Change and fallbacks** | Rain options, interest swaps and some skippable items | Separate cancellations or substitutions for **rain, fatigue, sold-out tickets, closures and transport delays** (leave by 18:00 if the child collapses, switch to all-indoor areas when it rains, one adult waits with an elderly traveller at the cable-car station) | | **Return-leg planning** | A reminder to adjust to the return time and allow airport time | Train and flight constraints are written into the itinerary itself: the Beijing plan shortens Day 4 by return departure window, the UK plan splits into two flight branches (and says not to lock Day 8 before flights are confirmed) | | **Information boundaries** | Reminders about reservations and opening hours | Assumptions and open items are marked systematically; prices, opening hours and operating policies are labelled **"to be verified" / "subject to the official channel"**, and the document ends with a **pre-trip verification checklist (tick each box)** carrying a **D-8 / D-7 / D-3 / same-day** timeline and the channel to verify with | | **Delivery form** | Usually a chat log you cannot hand to anyone | A **typeset PDF**: cover + page-numbered contents + branded footer, forwardable as-is to a family or travel group | ### What this plan saves you — and what it does not - It is a **decision-support** tool. Its value is "less homework, fewer pitfalls", not "I booked the tickets and verified everything for you": ticket prices, opening hours and reservation policies still follow the official channel's same-day notice. The plan marks those as "to be verified" and lays out a verification timeline. - No promise of "real-time accuracy", "everything officially verified" or "no research needed at all"; specific prices and times in the samples (ticket prices, height limits, operating hours) must be re-checked against official channels before you act on them. - One consultation covers one trip; if dates, head count or budget change materially, consult again with the updated inputs rather than force-fitting the old plan. ## A complete plan contains these 7 parts This is not "however much we feel like giving" — it is the service's **minimum delivery standard**: for guide-type requests (itinerary / planning / route / how many days), these sections must be output as separate Markdown sections, no less than 800 characters, with day-by-day detail down to attractions and time blocks. | # | Section | What goes in it | |---|---|---| | 1 | **Trip overview** | Destination combination, recommended days, overall pace and theme | | 2 | **Day-by-day schedule** | Day 1 to Day N, each day split into morning / afternoon / evening: attractions, visit duration, the **reason** for that day's order, and reminders for items that must be booked ahead | | 3 | **Intercity and local transport** | How to get there and back, approximate travel time, transfers and booking advice | | 4 | **Lodging advice** | Recommended **area + room-type rationale** (which area is convenient for which attractions), not a list of hotel names | | 5 | **Food recommendations** | Matched to the destination's character and who is travelling (kids / elderly / dietary restrictions) | | 6 | **Budget estimate** | Per-person or tiered pricing, broken down by transport / lodging / food / tickets | | 7 | **Important cautions** | Tailored per traveller type: elderly (slower pace / medical access / accessibility), children (safety / interest points / routines), groups (meeting points and roles) | ## How quality is checked Before delivery, every plan is self-checked against the 6 standards below, and problems are **fixed directly in the body** rather than dismissed with "please note this yourself". | Gate | Requirement | |---|---| | **Assumptions made explicit** | Unconfirmed items (holiday length and whether transfers are included, who is travelling, elderly walking ability, child's age and routines, total budget) are first declared as "this plan assumes...", never buried inside the deliverable | | **Season and time-sensitivity** | Items must match the travel season (e.g. winter seaside plans state water temperature and whether the pool is heated); peak-season closures, capacity limits or cancelled shows are always marked "to be verified" | | **Elderly and children can really do it** | Each day states door-to-door movement, continuous walking or standing time, and whether you really return to the hotel to rest; it also gives **fallbacks** for when the elderly leave early, a child tires, or it rains; family / group trips never exceed 2 distant major attractions per day | | **Facts hold up** | Attractions, cities, schedules and ticket prices must be correct and self-consistent; unverified services such as hotel kids' clubs, spas or shows are written as "confirm with the hotel / official channel", never as a confirmed schedule | | **Budget closes mathematically** | Unit price × quantity = subtotal, subtotals sum to the total, head count / rooms / nights can be recomputed, and the day count matches the day-by-day table | | **Structure complete** | The 7 sections above are all present, clearly layered, and usable as received | After generation an **independent review** runs: it scores the same 6 dimensions and, whenever a medium or high severity issue exists, it must produce a "revised complete answer" (it may not compress the result into bullet points) — so what you receive is a revised draft, not a first draft. ## Coverage and personalization options **Domestic and overseas trips are both supported; travel party, theme and content focus combine freely** — it is not a template, it retrieves and generates against your own travel profile. | Dimension | Available values | How to use | |---|---|---| | **Destination** | Domestic city / overseas city | **Put the city name directly in `query`** (e.g. "Beijing", "Rome", "Tokyo"); optionally use `country_code` with ISO 3166-1 alpha-2 (`CN` / `IT` / `JP`) as a hint | | **Travel party** | Family / with elderly / group or team / leisure | `is_family_suitable` / `is_group_suitable` / `is_leisure`, which drive pace, walking intensity, midday rest and meeting style | | **Theme (11 types)** | Outdoor adventure, culture and history, natural scenery, food and shopping, city sightseeing, study travel, family fun, wellness and medical, religious pilgrimage, red heritage | `topic_type` 0-10, which drives what gets selected and emphasised | | **Content focus (9 types)** | City geography, attractions, food, shopping, transport, lodging, travel guides, history and culture | `intro_type` 0-8, which drives which material is retrieved first | | **Output language** | Chinese (default) / English / other languages | `language` (ISO codes accepted, e.g. `zh` / `en`; anything not `zh`/`cn` is treated as non-Chinese). **The answer body and reference material follow `language`; the PDF shell (cover labels, table-of-contents title, footer disclaimer) and the delivery email are currently fixed Chinese.** See "Language support" below | | **Personalized combinations** | Any combination of the above | e.g. "overseas + family + study travel + attractions", "domestic + elderly + wellness + lodging and transport" | Common combinations: | What you say | Dimensions actually used | |---|---| | "6-day family trip to Kansai, Japan, with one day feeding deer in Nara" | `country_code=JP` + family + family fun | | "8 days in Yunnan with my parents, slow pace, not too much climbing" | `country_code=CN` + wellness / leisure + elderly pace constraints | | "Company team building in Chengdu, 20 people, 3 days" | `country_code=CN` + group + city sightseeing / food and shopping | | "10 days in Italy for art museums and churches" | `country_code=IT` + culture and history + history focus | > **Coverage follows the knowledge base**: destination material is organized by country, and city or attraction detail is driven by the `query` description. Common domestic and overseas destinations are covered, but actual coverage depends on retrieval results. > > Important: retrieval happens **during the paid generation stage** (before payment you only receive a bill; no pre-check of whether material exists). So for unusual destinations, describe the country and city only, in broader terms; if it still returns "no relevant travel information found", keep the order number and contact support. ## Language support (what is English-capable and what is not) `language` controls the generated answer. Verified against the current backend implementation: | Part | Chinese (`zh` / `cn`, default) | English / other languages | |---|---|---| | **Answer body** (Markdown: 7 sections, day-by-day plan, budget table, cautions) | Chinese | **Supports English and other languages** — the prompt tells the model to answer in `language`; the self-review and revision prompts inherit the same instruction | | **Reference material** (`ref_travel_infos`: title / summary / content / guide) | Chinese fields | Switches to the English fields (`title_en` / `summary_en` / `contents_en` / `travel_guide_en`) when `language` is not `zh`/`cn` — depends on the knowledge base having English text for that entry | | **PDF body** | Chinese/English as generated | Rendered from the answer, so the body matches `language` | | **PDF shell** (cover eyebrow, "咨询问题:" label, "Destination / Travel Dates / Delivered By" card labels, table-of-contents title "方案目录", footer disclaimer) | Chinese | **Still Chinese** — these strings are hard-coded in the PDF layout layer, not driven by `language` | | **PDF font** | CJK stack (PingFang SC / Microsoft YaHei / Noto Sans CJK) | Same stack; Latin text renders fine, but non-CJK/special scripts (Arabic, Thai, etc.) are not guaranteed | | **Delivery email** | Chinese | **Still Chinese** — template `travel_consult_pdf.html` and the LLM summary prompt are Chinese-only; the summary may still come back in Chinese even when `language=en` | | **Destination / travel dates on the cover** | Chinese | Extracted by a separate Chinese-only prompt, so these two cover values stay Chinese | Practical guidance: - For an English itinerary, pass `language=en` and write the `query` in English. You get an English answer body inside a Chinese-labelled PDF shell, delivered by a Chinese email. - If a fully English PDF shell and email matter, that is **not supported yet** — say so instead of promising it. - Untested languages (anything other than `zh` / `en`): the body prompt will try, but retrieval only has Chinese and English knowledge-base fields, so expected quality is lower. ## Why it is worth CNY 0.99 (approx USD 0.15) **It does not just recommend where to go — it plans how to get there, what it costs, and how to adjust when things change.** Four strengths: | Strength | What it actually does | |---|---| | **An itinerary you can execute** | Fixed 7-section output; daily route + transport connections + lodging area + booking reminders, down to morning / afternoon / evening and **departure times**, with the **reason** for each day's order — not a list of attractions | | **A budget you can read** | Itemized budget table with head count, nights, child pricing rule and FX basis, plus a "recalculation method" so changing head count or prices is easy | | **Family detail** | **Selection by the child's age and height**, **specific rest windows** and a continuous-walking cap, plus shortened routes and early-exit conditions for low stamina | | **Contingencies covered** | Specific cancellations or substitutions for rain, sold-out tickets, temporary closures, a tired child and transport delays, with a clear mark on what must be verified in advance | A few more points: | Feature | What it actually does | |---|---| | **Domestic and overseas, multi-scenario, multi-theme** | Destination code + 3 travel-party options + 11 themes + 9 content focuses can be stacked freely; the same destination can yield a family version, a wellness version or a study-travel version | | **Key facts are web-verified** | Up to 4 tool-call rounds during generation (about 2-3 batches of retrieval) to verify opening hours, ticket prices, schedules and seasonal shutdowns; anything unverified is labelled "to be verified" | | **You get a revised draft, not a first draft** | An independent review runs after generation; medium or high severity issues must be corrected with a full reissued answer (see the previous section) | | **A PDF you can actually forward** | Typeset document (cover + table of contents + branded footer with the official site), forwardable as-is to a family or travel group, no extra layout work | | **Transparent, per-call pricing** | CNY 0.99 (approx USD 0.15) per call, pay once and receive once; the amount follows the Alipay bill issued to you, no subscription, no auto-renewal | **Best for**: domestic and overseas destinations; family trips, travelling with elderly parents, group or team building, leisure holidays, honeymoons and anniversaries, study travel, wellness and medical, religious pilgrimage, red heritage themes, independent or self-drive travel, weekend getaways — any trip that needs "execution-level detail". **English / other languages**: the answer body, day-by-day plan and budget text can be generated in English (or other languages) with `language=en`, but the PDF cover labels and the delivery email are currently Chinese only. Do not promise a fully English PDF or email. **Not for**: real-time booking or payment of flights / hotels / tickets, visa application handling, products requiring a licensed travel-agency qualification, or safety-critical decisions such as live traffic or emergency medical guidance. ## Get started in three steps 1. **Describe your needs** (you will be asked first if the email is missing) > "Plan a 3-day family trip to Hangzhou, 2 adults and 1 child aged 6, budget under CNY 5000, not too tiring" 2. **Confirm payment**: you receive a CNY 0.99 (approx USD 0.15) Alipay payment entry — scan and pay (the same order **only needs to be paid once**) 3. **Wait for and receive the plan (about 2-3 minutes)**: the professional plan runs web verification plus one review, which usually takes **2-3 minutes**. While waiting you can say "ready yet / continue" every 30 seconds; the system checks progress using **the same order number**. Once generated, **the plan PDF is automatically emailed to the address you provided**, so closing the chat loses nothing. > Peak periods may take a bit longer, but **you never need to pay again**: however many times the same order is queried, it is delivered exactly once. ### How to phrase it for the best result Make these clear and the quality difference is large: **destination / days and dates / travel party (head count and ages) / budget range / pace preference / must-sees and dietary restrictions**. | What you say | Result | |---|---| | "Recommend something fun" | Too vague, only generic suggestions | | "Chengdu 4 days 3 nights, two adults and one child aged 8, budget 8000, stay downtown, want one day at the panda base, no spicy food" | Can be planned to execution level | ## How payment works (QR code / link / authorization) At payment time you see two things, both generated live by the payment capability **for this request**: | What you see | Explanation | |---|---| | **Alipay payment QR code** (image) | Scan it with the Alipay app's "Scan" feature | | **"Payment method" link** | Opening it on a phone also goes straight to the payment page; the link **expires**, so use it promptly | Please note these 5 points before paying: 1. **You need to scan and confirm the payment yourself in Alipay (AI Pay)**. Complete the authorization / identity confirmation Alipay requires; on first use of an AI Pay service you may need to enable or confirm once inside Alipay. That is a payment-platform security requirement, not this service collecting your information. 2. **The amount is CNY 0.99 (approx USD 0.15), one-off**: no subscription, no auto-renewal; the bill is issued in CNY and the actual amount follows the bill issued to you. 3. The QR code / link is **valid for a few minutes**; once it expires or is forwarded it stops working — just start a new request (**no charge if you do not pay**). 4. **After paying, say "paid" / "ready yet"**: the system retrieves the plan under **the same order** — **do not pay again**, a duplicate payment does not deliver twice. 5. Already paid but no plan yet: have the agent **query the order** (by order number) first; do not simply pay again. > The QR image and payment link are shown only inside this session and are generated by the payment capability. Please do not forward them to others. ## Pricing and billing | Item | Value | |---|---| | Unit price | **CNY 0.99 per call** — approx **USD 0.15** (subject to the `amount` returned in the 402 bill) | | Billing model | Alipay AI pay-per-use (HTTP 402), **per call, no subscription, no auto-renewal** | | Payment method | Alipay scan-to-pay (initiated by the official `alipay-bot`) | | Service ID | `API_7D36D49749854F1F` (for bill reconciliation; not sent by this Skill) | | Goods name | `仙踪问道_旅行咨询` | > **About the USD figure**: the bill is issued and settled in **CNY only** — USD is a display-only reference at roughly CNY 0.99 ≈ USD 0.15 (indicative rate ~6.7 CNY/USD, 2026-11). The amount actually charged is whatever the 402 bill states; exchange-rate movement does not change the CNY price. ## Troubleshooting (user view) | What you see | Meaning | What you can do | |---|---|---| | 402 + a bill is returned | Not paid yet — this is the normal first step | Complete the Alipay payment as prompted, then continue | | "Resource is being generated" (paid, plan not ready) | **Payment already succeeded**; a professional plan usually takes **2-3 minutes** | Check progress roughly **every 30 seconds** with **the same order number** (just say "ready yet"); once generated the PDF is **automatically emailed to the address you provided** — **do not pay again** | | Plan body succeeded but the PDF link is empty | Body is usable; the PDF rendering step failed | Use the body as usual; if you need a PDF, start a new consultation (**this bills again**, confirm first) | | PDF link does not open | Links are valid about 90 days and may have expired | Use the link in your email, or start a new consultation | | "Invalid proof / payment required again" | The payment proof has expired; the money status follows your Alipay bill | **Do not jump to "pay again"**: check that transaction in your Alipay bill first, then decide whether to retry with a new bill | | Request rejected (parameter error) | The question is empty or the email format is invalid | Fill it in and retry; **nothing has been charged at this point** | | "No relevant travel information found" | That destination / theme is not covered by the knowledge base (happens in the paid generation stage) | Keep the order number and contact support; do not pay again | | Server error (5xx) | The service is temporarily unhealthy | Retry later; if you have paid, query the order first rather than paying again | | Paid but still no plan | A rare anomaly | Raise a feedback case from the order in your Alipay transaction history, or contact support through the "Xianzong Wendao" channel with your order number | **Refunds and after-sales**: billing is per call; successfully delivered orders are neither billed twice nor automatically refunded. If you paid but received nothing, keep the order number and verify through the channels above. ## Privacy and data - The **email you provide is used only** to send the PDF plan and summary for this order. - The consultation request is stored server-side with the order for fulfilment and reconciliation; the PDF is generated once and the link is valid for about **90 days**. - The payment proof (`Payment-Proof`) and bill files land only on your machine under `~/.xianzong-travel-aipay/` (permissions 0700/0600); they are never echoed back and never committed to version control. --- ## Instructions for the agent Everything below is implementation detail. Users only need the sections above; the agent executes this section. ### Scope check First confirm, across all available Skills' `name` / `description`, that the request belongs to this Skill (travel plan / itinerary / Xianzong Wendao / travel consultation PDF). - Belongs to this Skill → follow this document. - The intent is only "pay / buy / checkout / scan", or the context contains `cashier*.alipay.com`, `excashier*.alipay.com`, `qr.alipay.com`, `Payment-Needed`, `amtPaymentLink` → hand over to **alipay-payment-skill**; this Skill does not take over payment actions. - Unrelated to this business → do not read this Skill's references, do not run this Skill's commands, and route to the most specific matching Skill. ### Responsibility boundary **This Skill = travel consultation orchestration + a 402 paywall entry.** It does exactly four things: collect and validate trip inputs and the email → obtain the 402 bill and persist the original request → retrieve the resource with **the same order and the same request body** → display the body and the PDF. Payment, bill signing, transaction queries and fulfilment receipts all go to the official `alipay-bot`; **never implement payment, self-sign, or construct fulfilment receipts / second receipts on your own**. ### Dependencies | Dependency | Purpose | When missing | |---|---|---| | `node` (>=18, zero third-party deps) | Runs `scripts/travel_aipay.mjs` | Report clearly and stop | | `alipay-bot` (official `@alipay/agent-payment`) | Payment / query / receipt | State that `npx -y @alipay/agent-payment@latest install` is needed, verify integrity per alipay-payment-skill's `references/command-recovery.md` before installing; **never install without user consent** | It shares the same Node runtime as the official buyer capability; **no Python or pip packages are required**. ### Request contract `POST https://api.riyuexinzhu.com/aipay/travel_consultant`, `Content-Type: application/json`; add `Payment-Proof` when retrieving the resource (it may only come from official CLI output). | Field | Required | Description | |---|---|---| | `query` | **Yes** | The travel question (destination city / days / travel party / budget / pace / must-sees / dietary restrictions; the fuller the better) | | `email` | **Yes** | Email that receives the typeset PDF plan | | `country_code` | No | ISO 3166-1 alpha-2 (`CN` / `IT`) | | `intro_type` | No | 0 all / 1 city geography / 2 attractions / 3 food / 4 shopping / 5 transport / 6 lodging / 7 travel guide / 8 history and culture | | `topic_type` | No | 0 all / 1 outdoor adventure / 2 culture and history / 3 natural scenery / 4 food and shopping / 5 city sightseeing / 6 study travel / 7 family fun / 8 wellness and medical / 9 religious pilgrimage / 10 red heritage | | `is_group_suitable` / `is_family_suitable` / `is_leisure` | No | 1 yes / 0 no | | `is_with_ref` | No | 1 return reference material (default) / 0 do not return | | `language` | No | Answer language, default `zh`. `zh` / `cn` = Chinese; any other value (e.g. `en`) switches the answer body and reference material to non-Chinese. The PDF shell labels and the delivery email stay Chinese regardless. | | `options` | No | Extension dict that can override same-named fields | An empty `query` or an invalid `email` returns 400 **before payment** and produces no bill — validate first, then issue the 402. ### Subcommands | Subcommand | Purpose | |---|---| | `body` | Builds and prints the request body only (no request sent) | | `probe` | Unpaid request that obtains the 402 bill; writes `payment-needed.txt` / `body.json` / `state.json` | | `pay` | Calls the official `alipay-bot 402-buyer-pay`; **requires `--confirm`** (after explicit user consent) | | `complete` | Retrieves the resource after payment: by default via the official `402-query-payment-status` (optionally `--wait` to poll); `--proof` fetches directly with the proof | | `render` | Renders a saved delivery response into displayable text | ```bash SKILL_DIR=skills/xianzong-travel-aipay node "$SKILL_DIR/scripts/travel_aipay.mjs" body --query '3-day family trip to Hangzhou, 2 adults + 1 child' --email buyer@example.com node "$SKILL_DIR/scripts/travel_aipay.mjs" probe \ --query '3-day family trip to Hangzhou, 2 adults + 1 child, budget within CNY 5000, avoid long walks' \ --email buyer@example.com --country-code CN --topic-type 7 --is-family-suitable 1 node "$SKILL_DIR/scripts/travel_aipay.mjs" pay --confirm --session-id '<current session id>' node "$SKILL_DIR/scripts/travel_aipay.mjs" complete --out-shake-no '<official order number>' ``` State files default to `~/.xianzong-travel-aipay/` (0700/0600), independent of the current working directory and never written into the repo; override with `--state-dir`. ### Exit-code matrix | HTTP / business | Meaning | Exit code | Next step | |---|---|---|---| | `402` + `Payment-Needed` | Payment required | `0` (probe) | After user confirmation, `pay --confirm` | | `200` | Delivered (including idempotent replay of the same order) | `0` | Show the body and PDF; **do not send an extra receipt** | | `409` + `Retry-After` | Payment confirmed, resource still generating (normally 2-3 minutes) | `3` | Poll `complete --out-shake-no` with **the same order number** per `Retry-After` (default 30s); **never pay again** | | `200` but `resp_code != 200` | Business failure (already verified as paid) | `4` | Report the reason as-is; do not auto-retry, do not pay again | | `402` (after resending with a proof) | Proof invalid / expired | `5` | Explain the proof is invalid and ask the user to check the Alipay bill; **do not steer straight into a second payment** | | `400` | Request rejected | `2` | Fix the parameters and retry; nothing charged | | `5xx` | Server error | `6` | Report as-is; only network-type errors may be retried once | | Query returns `resourceResponse: null` | Service momentarily unavailable (deploy/restart or a network blip; the request died in transport) | `6` | Re-run `complete` unchanged with **the same order number** (or add `--wait`); **never pay again** | ### Reading the official query payload (measured 2026-11-14; judge by fields) `alipay-bot 402-query-payment-status --output json` has only three shapes; **neither the exit code nor `resourceDelivered` can be used to judge success**: | Shape | Key fields | Meaning | Action | |---|---|---|---| | Success | `success: true` + `resourceResponse.status: 200` + `resourceResponse.body.content` (business JSON string) | Resource delivered (`body.already_fulfilled=true` means an idempotent replay) | Show it directly; send no further receipt | | Generating | `errorMessage` contains `HTTP 409` + `resourceResponse.status: 409` | Verified as paid, plan is being generated | Query again later with **the same order** (prefer `--wait`) | | Transient failure | `errorCode: RESOURCE_REQUEST_FAILED` + `resourceResponse: null` | Deploy/restart or network blip | Re-run unchanged (or `--wait` to auto-retry) | Additional facts: - **The server-side business response does expose `resourceDelivered`**: this service returns `resourceDelivered: true` in 200 bodies and `resourceDelivered: false` on 409 (generating), so it can be read directly; whereas the same-named field in the official CLI envelope is `omitempty` (absent on success), so **the envelope field must not be used to judge success**. - **`resourceDelivered` is not a 402 protocol field, nor an officially documented convention**: it is only an internal field of the `alipay-bot --output json` result envelope (the binary contains both `json:"resourceDelivered"` and `json:"resourceDelivered,omitempty"`; the success path omits it and only failure payloads show `false` explicitly). It is useful for diagnostics, **never as a success/failure criterion**. - **The success payload carries no `resourceDelivered` field** (it only appears on failure payloads). Judging success by `resourceDelivered === true` or by the CLI exit code misfires as "not delivered", causing endless re-queries, while the server log already says `state=FULFILLED, is_first_delivery=False` (the order is fulfilled; re-queries are only idempotent replays and never charge twice). - A business-level failure (verified as paid but `resp_code != 200`) is still HTTP 200; read `resp_code` inside `body.content` and never present it as success. - Just use `complete --out-shake-no '<order no>' --wait`: the script reads the fields above and polls automatically (default every 40s, up to 15 minutes); do not hand-roll a grep polling loop. ### Execution flow See [references/402-travel-flow.md](references/402-travel-flow.md) for the detailed commands and payload interpretation (read it once before entering payment). 1. **Collect the inputs**: `query` + `email`. If `email` is missing you must stop and ask; never invent one. 2. **Validate locally**: run `body` to print the request body and confirm the fields. 3. **Obtain the bill**: run `probe` → bill / request body / state files. 4. **Stop before payment confirmation and hand the payment entry to the user as-is**: state the unit price (CNY 0.99 ≈ USD 0.15), goods name and order number; show the **Alipay QR image and the "payment method" link** from this `pay` output (send the image through the image channel and delete the `MEDIA:` lines from the text; keep the link character-for-character complete, never truncate or rewrite it). Remind the user: "CNY 0.99 (approx USD 0.15), one-off, you must scan and confirm AI Pay in your own Alipay app, say something when you have paid, do not pay twice". **Never run `pay --confirm` without explicit confirmation in the current conversation.** 5. **Retrieve after payment (expect 2-3 minutes)**: prefer `complete --out-shake-no '<official order number>' --wait` (the script interprets the official payload fields, auto-detects 409/transient failures and polls, up to 15 minutes, never charging twice), or `complete --proof '<proof>'`. Without `--wait`, every 409 must be re-queried with **the same order number** after `Retry-After` (default 30s), and tell the user: "a professional plan usually takes 2-3 minutes; once generated the PDF is emailed automatically, no need to pay again or watch the chat". 6. **Present**: show the body as-is; output the PDF link (including signature parameters) **in full, never truncated**, and state that it is valid about 90 days and has been emailed; **never show any cost / pricing field**. ### Hard boundaries - **Payment only through the official CLI**: `402-buyer-pay` / `402-query-payment-status` / `402-buyer-fulfillment-ack` (the last one only when the official output explicitly reports a receipt failure and the user asks to recover). Never call Alipay directly, never construct signatures, never reshape the `Payment-Needed` header. - **Reuse the same order**: the `body.json` created by `probe` is the request for this order; retries and queries reuse it. Do not change the content, do not create a new order. - **Query the order when the state is unclear**: timeouts, incomplete output, the user saying "paid / continue / ready yet", or any 409 → query the original order first; do not pay again. - **No extra receipt on success**: the official command already sends the fulfilment receipt; never send a second one. - **Show the payment entry as-is**: the QR image and payment link may come only from **this** `pay` output; never reuse historical or someone else's links, never rewrite, never omit. If the link expired, obtain a new bill — never invent a payment address. - **Sensitive data**: `Payment-Proof` and bill files land only in 0600 files and are never echoed into user-facing text. - **Production red lines**: only call this one deployed paid endpoint; do not change server code, do not change `src/configs/aipay.yml`, do not touch production data. ### Known traps - **Polling criterion (measured 2026-11-14, a real pitfall)**: the official query's success payload has **no** `resourceDelivered` field; success can only be judged by `success: true` + `resourceResponse.status: 200`. `resourceResponse: null` is a transient unavailability (retryable), not a delivery failure. Do not hand-roll a grep polling loop; use `complete --wait`. - `skills/` is **not** in VS Code's default skill scan list; it depends on `chat.agentSkillsLocations` in `.vscode/settings.json`. Without that setting it can only be loaded by explicit filename. - `name` must be lowercase letters/digits/hyphens and must equal the directory name (underscore forms like `travel_aipay` are invalid). - `Payment-Needed` is **Base64URL**; do not parse it as JSON directly. - A verification response missing `amount` is rejected and re-billed → when you get a 402 again, **do not** treat it as "unpaid" and pay again. ## File list | Path | Purpose | |---|---| | `SKILL.md` | Product introduction, onboarding, user-facing troubleshooting, contract and boundaries | | `scripts/travel_aipay.mjs` | Request body assembly, 402 bill retrieval, official payment orchestration, retrieval (`complete --wait` polling + official payload interpretation), result rendering (zero dependencies) | | `references/402-travel-flow.md` | Full 402 flow commands and interpretation (read before payment) | | `references/install-and-pack.md` | Running, local loading and packaging notes | | `tests/mock_server.mjs` | Local mock resource server (fake bills, never touches the real service) | | `tests/run_offline_tests.mjs` | Offline regression: 402 / generating / success / failure / same-order retry / payment interception | | `.gitignore` | Excludes working directory, proofs and packaging artifacts | --- ## About Xianzong Wendao **Xianzong Wendao** focuses on "turning the place you want to go into an itinerary you can actually walk through" — using AI to fold destination reality, transport connections, seasonal change and budget constraints into a plan you can execute directly. If you want to bring travel consultation into your own product, or need batch or customized itinerary capability, visit the official site **https://xianzongwendao.com** for details and contact. > [To be added before release] Mini-program / official account entry and support contact.
这是模型对公开材料的总结,不是官方声明,请以原链内容为准。
存档时间线
| 版本 | 存档时间 | 内容哈希 | 内容 |
|---|---|---|---|
| v1 | 2026-11-17 12:10 | 4b68097d | 可取 |
版本索引永久保留;内容副本只保留最新 1 份,更早版本仅留索引与哈希(存档时间线的证据链不会因此断裂)。
提交举报 / 纠错
侵权举报经核验成立后,我们会即时下线该条目并删除已存的内容副本。