支付宝异步通知中继 — AI Agent Skill(Claude Code / Cursor)
# alipay-notify
[](LICENSE)
[](https://www.python.org)
[](https://github.com/zhangke091/alipay-notify/releases)
**免费提供公网异步通知地址**,让本地开发环境也能实时接收支付宝异步通知(`notify_url`)。
无需自建服务、无需公网 IP、无需内网穿透,注册即用。服务端支持 HTTPS(TLS 1.3)+ 域名访问。
### 适用场景
- 本地联调支付宝支付(手机网站支付、电脑网站支付、当面付等)
- 沙箱环境回调调试
- CI/CD 环境回调验证
- 任何没有公网 IP 又需要接收 `notify_url` 回调的场景
```
支付宝 ──POST──► 云端中继 ──SSE──► 本地 CLI 实时拉取
└───► 浏览器查看器(dev.html)
```
---
## 快速上手(1 分钟)
不需要 AI Agent,直接在终端跑 3 条命令就能收到支付宝异步通知:
```bash
# 1. 注册,获取你的专属 notify_url(服务地址向管理员获取)
python3 scripts/cli.py register --server https://www.opensupport.cc --name my-dev
# 输出示例:
# ✓ 注册成功!
# notify_url
# ┌──────────────────────────────────────────────────────────────────┐
# │ https://www.opensupport.cc/notify/<your-token> │
# └──────────────────────────────────────────────────────────────────┘
# 2. 把 notify_url 传入支付宝下单接口(不是在开放平台控制台配置)
# Java: request.setNotifyUrl("<输出的 notify_url>");
# Python: client.page_execute(request, notify_url="<输出的 notify_url>")
# 3. 开始监听,支付成功后通知实时到达
python3 scripts/cli.py listen
```
收到通知后终端输出:
```
┃ 新通知 #1
┃ 时间 2026-04-12 23:55:01
┃ 订单号 TEST202604122347040ccf52
┃ 交易号 2026041222001100001038276505
┃ 金额 0.01
┃ 状态 TRADE_SUCCESS ✓
```
更多命令:
```bash
python3 scripts/cli.py list # 查询通知列表
python3 scripts/cli.py get 1 # 查看通知详情
python3 scripts/cli.py export 1 # 导出原始报文
python3 scripts/cli.py verify 1 # RSA2 验签(需 pip install cryptography)
python3 scripts/cli.py ack 1 # 确认通知,停止支付宝重试
```
**浏览器查看器**:访问 `https://www.opensupport.cc/dev.html`,用 API Key 登录后可实时查看通知、金额、状态,支持原始报文复制和 ACK 确认。
---
## AI Agent 用法
这也是一个标准的 **AI Agent Skill**。安装到支持 Skill 的 AI 编程工具后,对 Agent 说一句话就行:
> 帮我接收支付宝异步通知
Agent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.
Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.
Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.
Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.
Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.
Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.