a collection of subscription and paid tools
Author: alipay
Version: 0.0.1
Type: tool
AI agent developers can seamlessly integrate subscription payment services through the Alipay AI Subscription Payment Plugin. This plugin enables developers to implement flexible pricing models (per-usage or time-based) within their AI agents. Currently, it provides subscription initialization, subscription status querying, and subscription-based consumption tracking capabilities.
This plugin encompasses three essential tools:
To configure API Key authorization, the following parameters are required:
How to Obtain: For detailed instructions on obtaining Alipay Open Platform App ID, Application Private Key, and Alipay Public Key, please refer to: Integration Prerequisites
Creates an Alipay subscription order and returns a payment URL. Users can click the link to be redirected to Alipay to complete the subscription payment.
Parameter Specifications:
Queries the status of Alipay subscription agreements to verify whether a user's subscription remains valid.
Parameter Specifications:
Executes Alipay subscription consumption with usage-based billing operations.
Parameter Specifications:
Using a simple conversational AI agent as an example, we demonstrate an AI assistant integrated with subscription capabilities. This assistant provides subscription services to users, including subscription creation, status querying, and usage-based billing.


Add the Alipay subscription plugin to your AI agent in the Dify platform.
In a workflow scenario, when users inquire about subscription status, invoke the "Query Alipay Subscription Status" tool:

Response:

When users request subscription services, invoke the "Initialize Alipay Subscription Link" tool to generate a payment URL. After generating the subscription link, for desktop users, convert the URL to a QR code to guide users through scanning and subscribing. For mobile users, direct clicking will initiate the subscription.
Response:

When users utilize services, invoke the "Alipay Subscription Usage Service" tool for usage-based billing:
Response:

We look forward to exploring the limitless possibilities of AI subscription payments with developers, jointly creating smarter and more convenient subscription payment experiences. If you encounter any issues during usage or have collaboration inquiries, please join the Alipay AI Service Partnership Group by scanning the DingTalk QR code below. We are always ready to listen to your suggestions and requirements.
