PayPack · by Xiamen Shizhun Technology

PayPack — Payment middleware for AI agents

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.

What problem it solves

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.

How it works

  1. The agent creates a payment intent — amount, subject, and channel (Alipay or WeChat Pay).
  2. PayPack creates the order with the payment provider and returns a payment URL or QR payload.
  3. The user pays in their own Alipay or WeChat Pay app.
  4. PayPack receives the callback and treats it as a signal only — the callback is never trusted on its own.
  5. PayPack verifies the order server-side by querying the provider, then compares the amount against the local order record.
  6. The agent receives the final state — paid, pending, or failed — and continues its task.

Supported payment channels

ChannelStatusNotes
AlipaySupportedPrimary domestic channel
WeChat PaySupportedPrimary domestic channel
USDCMiddleware test featureUsed for middleware testing; not enabled for production collection on our own site

Quickstart

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

Security model

License and versioning

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.

Summary

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