payment-skill

payment-skill is a skill for Claude Code, Codex from TencentCloudBase/awesome-miniprogram-skills. It costs 34 tokens per session (1,203 once invoked), scanned A, original, MIT.

A WeChat Pay workflow for creating payments, checking or closing orders, handling refunds, and making or checking merchant transfers.

In plain words
What is it for?
Handling customer requests to pay, check an order, cancel an unpaid order, request or track a refund, or send and track a merchant transfer in a WeChat mini program.
Why use it?
It keeps each payment action in the correct order and enforces rules such as refunding only paid orders and closing only unpaid orders.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tencentcloudbase/awesome-miniprogram-skills/payment-skill
Any agent
npx skills add TencentCloudBase/awesome-miniprogram-skills --skill payment-skill
Clone the repo
git clone --depth 1 https://github.com/TencentCloudBase/awesome-miniprogram-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 payment-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/tencentcloudbase/awesome-miniprogram-skills/payment-skill.svg)](https://agentmods.dev/skills/tencentcloudbase/awesome-miniprogram-skills/payment-skill)
Your own site
<a href="https://agentmods.dev/skills/tencentcloudbase/awesome-miniprogram-skills/payment-skill"><img src="https://agentmods.dev/badge/skills/tencentcloudbase/awesome-miniprogram-skills/payment-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00034 $0.01203
Opus 5 $0.00017 $0.00602
Sonnet 5 $0.00007 $0.00241
Haiku 4.5 $0.00003 $0.00120

Measured 5d ago against content hash 13a31e796a1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

payment-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 5d ago.

The scan reads SKILL.md. This mod also ships 30 executable files (apis/closeOrder.js, apis/createOrder.js, apis/queryOrder.js, …), 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.

skills/payment-skill/SKILL.md · 104 lines

How it starts

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

payment-skill 微信支付场景

业务流程图

用户意图
  │
  ├─ 下单支付("帮我付款")──→ createOrder → 支付订单卡片
  │                                │
  │                       用户点击"确认支付"
  │                                ↓
  │                       调用 wx.requestPayment
  │                                ↓
  │                          支付成功/失败
  │
  ├─ 查询订单("查一下订单")──→ queryOrder → 订单状态卡片
  │
  ├─ 关闭订单("取消这个订单")─→ closeOrder → 订单状态卡片(已关闭)
  │
  ├─ 申请退款("我要退款")───→ refundOrder → 退款结果卡片
  │
  ├─ 查询退款("退款进度")───→ queryRefund → 退款状态卡片
  │
  ├─ 商家转账("转账给我")───→ transferMoney → 转账结果卡片
  │
  └─ 查询转账("转账到了吗")──→ queryTransfer → 转账状态卡片

createOrder 必须在支付前调用——先获取支付参数才能调起微信支付。 refundOrder 必须在订单支付成功后调用——未支付的订单无法退款。 closeOrder 仅适用于未支付的订单——已支付订单无法关闭,需走退款流程。

原子接口依赖关系

接口 作用 组件 前置条件
createOrder 创建支付订单并调起支付 payment-card 用户明确表达支付意图
queryOrder 查询订单状态 order-status-card 已有 outTradeNo
closeOrder 关闭未支付订单 order-status-card 订单状态为 NOTPAY
refundOrder 申请退款 refund-card 订单状态为 SUCCESS
queryRefund 查询退款进度 refund-card 已有 outRefundNo
transferMoney 发起商家转账 transfer-card 用户确认转账
queryTransfer 查询转账状态 transfer-card 已有 outBillNo

业务约束(跨接口铁律)

1. 输出形态

  • 所有成功返回的接口(isError=false)且绑定了组件的,必须展示卡片,禁止以纯文本列出卡片中的详情数据。
  • Agent 回复时可附加一句简短引导话术,但禁止把订单号、金额、状态等以 markdown 列表形式展开

2. 执行顺序

  • refundOrder 必须在 queryOrder 确认订单为 SUCCESS 状态后调用。
  • closeOrder 必须在 queryOrder 确认订单为 NOTPAY 状态后调用。
  • 禁止并发调用支付接口;须等上一笔结束后再发起下一笔。

3. 数据来源

  • outTradeNo 必须来自 createOrder 返回的 outTradeNo 原值,禁止编造。
  • outRefundNo 必须来自 refundOrder 返回的 outRefundNo 原值,禁止编造。
  • outBillNo 必须来自 transferMoney 返回的 outBillNo 原值,禁止编造。

4. 金额处理

  • 所有金额单位为(如 1 元 = 100 分)。
  • 禁止使用前端传入的金额直接下单,生产环境应从后端查询。
  • 退款金额不能超过订单总金额。

5. 安全约束

  • 后端通过 wx.cloud.callHTTPFunction 调用,平台自动鉴权。
  • payer.openid 由后端从 x-wx-openid header 自动获取,前端无需传递。
  • 禁止在前端硬编码任何密钥或证书信息。

用户意图分流

直接意图(触发本 SKILL)

  • "帮我付款"
  • "我要支付"
  • "买单"
  • "查一下订单状态"
  • "这个订单还没付吧"
  • "取消订单"
  • "关闭这个订单"
  • "我要退款"
  • "申请退货退款"
  • "退款到哪了"
  • "转账给我"
  • "发红包"

Read the full file on GitHub · 104 lines

Files

What ships with it

51 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. 5d ago First seen · 104 lines · 34 tokens per session scan A 13a31e796a1d

Subscribe to this mod's changes

payment-skill is a skill published in the GitHub repository TencentCloudBase/awesome-miniprogram-skills (35 stars, last pushed 2mo ago), licensed MIT. It adds 34 tokens to every session and 1,203 once invoked, about $0.0002 per session on Opus 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-08-30.

Related

Other skills, from other repositories

invoice

标准发票: 寄件/收件 + 明细 + 税 + 总额 + 付款指引.

nexu-io/html-anything · 26 tokens

asc-ppp-pricing

Set territory-specific pricing for subscriptions and in-app purchases using current asc setup, pricing summary, price import, and price schedule commands. Use when adjusting prices by country or implementing localized PPP strategies.

rorkai/app-store-connect-cli-skills · 45 tokens

stripe

Stripe API integration with managed OAuth. Manage customers, subscriptions, invoices, products, prices, and payments. Use this skill when users want to process payments, manage billing, or handle subscriptions with Stripe. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).…

CraftOS-dev/CraftBot · 79 tokens

cloudbase-wechat-integration

CloudBase WeChat integration guide for Mini Program WeChat Pay, Mini Program virtual payment (虚拟支付, wx.requestVirtualPayment), Official Account JSAPI Pay, Native QR-code Pay, Official Account OAuth, openid handling, payment callbacks, and CloudBase Integration Center generated functions. This skill should be used when…

TencentCloudBase/CloudBase-AI-Toolkit · 94 tokens

amazon-wholesale-sourcing

Wholesale product sourcing — supplier discovery, negotiation, MOQ optimization, margin analysis.

nexscope-ai/Amazon-Skills · 20 tokens

ai-slop

Operational rubric that turns "don't make AI slop" into observable properties, severity levels, evidence requirements, and repair actions for interface design. Use as the reference rubric when building or reviewing marketing sites, product interfaces, dashboards, portfolios, or e-commerce pages, especially alongside…

waybarrios/opencode-power-pack · 61 tokens