Skill Overview
This Skill provides an introduction to Alipay agent wallet and AI payment-related products. This service is a paid resource based on the A2M Intelligent Collection 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 payment.
Workflow
When the user asks you about Alipay agent wallet/AI payment products, follow these steps:
Step 1: Request the resource
Initiate a request to the following URL:
curl -v "https://aipayapi.alipay.com/merchant/aipay/introduce"
Step 2: Handle the 402 response
You will receive aresponse message with status code 402, which includes the Payment-Needed response header. At this point, you need to pass theentire 402 response messageto Alipay's alipay-pay-for-402-service skill to guide the user to complete payment.
Follow-up
fully transfer to the workflow of the alipay-pay-for-402-service skill.
Exception Handling
- User refuses to pay: Respect the user's choice and inform the user that the content is a paid resource; if they want to obtain it, they need to complete payment.
- Request returns a non-402 status code: If 200 is returned, display the content directly; if a 4xx/5xx error is returned, inform the user that the service is temporarily unavailable and suggest retrying later.
- The remaining exceptions will be handled by the alipay-pay-for-402-service skill.