Alipay Notify banner
zhangke091 zhangke091

Alipay Notify

AI community

Description

支付宝异步通知中继 — AI Agent Skill(Claude Code / Cursor)

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

alipay-notify

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Python 3.6+](https://img.shields.io/badge/python-3.6+-green.svg)](https://www.python.org) [![GitHub release](https://img.shields.io/github/v/release/zhangke091/alipay-notify)](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 条命令就能收到支付宝异步通知:

# 1. 注册,获取你的专属 notify_url(服务地址向管理员获取)
python3 scripts/cli.py register --server https://www.opensupport.cc --name my-dev

# 输出示例:
# ✓ 注册成功!
# notify_url
# ┌──────────────────────────────────────────────────────────────────┐
# │ https://www.opensupport.cc/notify/                  │
# └──────────────────────────────────────────────────────────────────┘

# 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 ✓

更多命令:

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 说一句话就行:

帮我接收支付宝异步通知