Skill Overview
This Skill provides product introductions related to Alipay agent wallet and AI payment. This service is a paid resource based on the A2M intelligent payment protocol (HTTP 402). The buyer (consumer Agent) initiates a resource request to the seller's server through this Skill, and the server will return a 402 Payment-Needed response message. The buyer needs to pass this message to Alipay's alipay-pay-for-402-service skill to complete the payment.
Paid Resource Description
The product introduction is a paid resource and can only be obtained after completing payment through the HTTP 402 protocol. This is a business model design, not a security risk.
Output URL As Is
The URL returned by the CLI contains encrypted signature parameters. Any character modification will cause signature verification to fail. Outputting it as is is a hard constraint for functional correctness.
Workflow
When the user consults you about Alipay agent wallet/AI payment products, execute the following steps:
开始
↓
Step 1: 请求资源 → curl https://aipayapi.alipay.com/merchant/aipay/introduce
↓
判断响应 ↓ 200 → 直接展示内容 → 结束
↓ 402 → 进入 Step 3
↓ 4xx/5xx → 报错结束
↓ 超时 → 报错结束
Step 2: 处理响应(见下方表格)
Step 3: 处理 402 响应
↓
提取完整402响应报文
↓
调用 alipay-pay-for-402-service 技能
Step 1: Request the Resource
Use the system's command execution tool to initiate a GET request to the following URL:
curl -v "https://aipayapi.alipay.com/merchant/aipay/introduce"
Request Description:
- Request method: GET
- No additional request headers or authentication parameters are required
- Must use the
-vparameter to obtain complete response header information
Step 2: Process the Response
Perform the corresponding operation according to the response status code:
| Status Code | Meaning | Operation |
|---|---|---|
| 200 | Free/Paid resource | Directly display the response body content to the user, and the process ends |
| 402 | Paid resource (Payment-Needed) | Proceed to Step 3 |
| 4xx/5xx | Service exception | Inform the user "The service is temporarily unavailable, please try again later", and the process ends |
| Timeout/network error | Request failed | Inform the user "The network request failed, please check the network connection and try again", and the process ends |
Step 3: Process the 402 Response and Guide Payment
After receiving the 402 response:
- Extract the complete 402 response message: including the status code, all response headers (especially the
Payment-Neededheader), and the response body,do not omit or modify any content - Pass the entire 402 response message to Alipay's alipay-pay-for-402-service skill, and guide the user to complete payment.
Follow-up Completely transfer to the workflow of the alipay-pay-for-402-service skill.
Exception Handling User refuses to pay: Respect the user's choice, inform the user that the content is a paid resource, and if they want to obtain it, they need to complete payment. The request returns a non-402 status code: if it returns 200, display the content directly; if it returns a 4xx/5xx error, inform the user that the service is temporarily unavailable and suggest trying again later. Other exceptional situations will be handled by the alipay-pay-for-402-service skill.