fastapi-alipay-pay-skill

fastapi-alipay-pay-skill is a skill for Claude Code, Codex from jiushiwon/wg-skills. It costs 151 tokens per session (4,158 once invoked), scanned A, original, Apache-2.0.

A FastAPI module for Alipay, a Chinese online payment service. It covers in-person, mobile web, desktop web, and app payments, plus refunds, signed callbacks, order queries, closing orders, and bill downloads.

In plain words
What is it for?
Use it to add Alipay checkout and QR-code flows, verify payment notifications, process refunds, manage orders, and download bills for reconciliation.
Why use it?
It provides the API routes and payment operations needed to connect an existing Python FastAPI application to Alipay without adding WeChat Pay.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add Alipay checkout and QR-code flows, verify payment notifications, process refunds, manage orders, and download bills for reconciliation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jiushiwon/wg-skills/fastapi-alipay-pay-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jiushiwon/wg-skills --skill fastapi-alipay-pay-skill
Clone the repo
git clone --depth 1 https://github.com/jiushiwon/wg-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fastapi-alipay-pay-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-alipay-pay-skill/github.svg)](https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-alipay-pay-skill)
Your own site
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-alipay-pay-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-alipay-pay-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fastapi-alipay-pay-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-alipay-pay-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-alipay-pay-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,158 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00151 $0.04158
Opus 5.5 $0.00060 $0.01663
Sonnet 5.5 $0.00030 $0.00832
Haiku 4.5 $0.00015 $0.00416

Measured 1mo ago against content hash 7795209d5ed8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fastapi-alipay-pay-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (templates/alipay_pay_service.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

backend/python/fastapi-module/fastapi-alipay-pay-skill/SKILL.md · 444 lines

How it starts

The opening of the file, as written. The whole thing — 444 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FastAPI Alipay Module Skill

支付宝独立模块,只覆盖支付宝渠道。Python FastAPI 实现。

与合一版的关系

Skill 范围 推荐度
fastapi-alipay-pay-skill(本) 仅支付宝 ⭐⭐⭐⭐⭐ 单一渠道
fastapi-wechat-pay-skill 仅微信 V3 ⭐⭐⭐⭐⭐ 单一渠道
fastapi-payment-module-skill 微信+支付宝合一 旧版,已不推荐

能力清单

能力 适用场景 接口
当面付 线下扫码 / 收银台 POST /api/alipay/precreate
手机网站支付 移动端浏览器 H5 POST /api/alipay/wap
PC 网站支付 PC 浏览器 POST /api/alipay/page
App 支付 iOS / Android App POST /api/alipay/app
退款 全场景通用 POST /api/alipay/refund
查询订单 全场景通用 GET /api/alipay/query/{order_no}
关单 全场景通用 POST /api/alipay/close/{order_no}
对账单下载 财务对账 GET /api/alipay/bill
回调验签 全场景通用 POST /api/alipay/notify

前置依赖

依赖 说明
fastapi-init-skill 项目骨架(必须)
fastapi-auth-module-skill 当前用户获取(推荐)
python-redis-module-skill 幂等防重 + 限流(推荐)

核心实现

1. 依赖

# 支付宝官方 Python SDK
pip install python-alipay-sdk

# 或新版 pycryptodome(签名需要)
pip install pycryptodome

2. 配置(config.py)

from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    # ====== 必填项:从开放平台获取 ======
    alipay_app_id: str = "2021000000000000"           # 16 位 APPID
    alipay_private_key: str = ""                       # 应用私钥(PEM PKCS8,含 BEGIN/END 头)
    alipay_public_key: str = ""                        # 支付宝公钥(**不是应用公钥**)

    # ====== 业务地址 ======
    alipay_gateway: str = "https://openapi.alipay.com/gateway.do"
    alipay_sandbox_gateway: str = "https://openapi.alipaydev.com/gateway.do"
    alipay_notify_url: str = "https://yourdomain.com/api/alipay/notify"
    alipay_return_url: str = "https://yourdomain.com/pay/return"

    # ====== 可选 ======
    alipay_sign_type: str = "RSA2"                     # 固定 RSA2
    alipay_charset: str = "UTF-8"
    alipay_format: str = "json"
    alipay_debug: bool = False

    class Config:
        env_file = ".env"

settings = Settings()

Read the full file on GitHub · 444 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 444 lines · 151 tokens per session scan A 7795209d5ed8

Subscribe to this mod's changes

fastapi-alipay-pay-skill is a skill published in the GitHub repository jiushiwon/wg-skills (154 stars, last pushed 7d ago), licensed Apache-2.0. It adds 151 tokens to every session and 4,158 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.

Related

fastapi-alipay-pay-skill compared with skills from other repositories

fastapi-alipay-pay-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fastapi-alipay-pay-skilljiushiwon/wg-skillsSkill1547d agoApache-2.0A151Claude Code, Codex
x402browser-use/browser-useSkill122kyesterdayMITA166Claude Code
tushareHKUDS/Vibe-TradingSkill39kyesterdayMITA79Claude Code, Codex
hyperliquid-websocketgalleonlabs/hypergrok-trading-deskSkill635yesterdayMITA89Claude Code
wechatpay-payment-integrationwechatpay-apiv3/wechatpay-skillsSkill37912d agoMITA330Claude Code, Codex
build-a-stripe-integrationsuperset-sh/supersetSkill17k2d agoMITA74Claude Code
freee-api-skillfreee/freee-mcpSkill525yesterdayApache-2.0A397Claude Code