PayPack is payment middleware that lets AI agents complete payments on their own, supporting Alipay and WeChat Pay, distributed as the open-source package langchain-paypack for developers to integrate.
An agent that can think but cannot pay still needs a human to finish the transaction. PayPack gives the agent a payment layer: it creates the order, hands back the payment link or QR payload, waits for the provider callback, verifies the result on the server side, and reports the final state back to the agent.
The agent never holds card data or merchant keys. It only receives a payment intent and a status.
| Channel | Status | Notes |
|---|---|---|
| Alipay | Supported | Primary domestic channel |
| WeChat Pay | Supported | Primary domestic channel |
| USDC | Middleware test feature | Used for middleware testing; not enabled for production collection on our own site |
Install the package and let the agent call the payment tool:
pip install langchain-paypack
from langchain_paypack import PayPackTool
payment = PayPackTool(
api_base="https://your-endpoint.example",
api_key="pp_...",
)
result = payment.run({
"amount": "9.90", # CNY
"subject": "API credits",
"channel": "alipay", # or "wechat"
})
# result contains: order_id, pay_url, status
The early community version is released under Apache-2.0 (Gitee / GitHub repository, PyPI package langchain-paypack). Later iterations are developed under a closed license for internal platform use.
langchain-paypack.
PayPack is a developer tool for payment integration. It does not provide investment services, does not promise returns, and does not hold user funds.
Operated by Xiamen Shizhun Technology Co., Ltd. (Unified Social Credit Code: 91350211MA34XHGG5T) · Website: rhcjw.com · ICP filing: 闽ICP备2024041817号-2