Token导航 LogoToken导航

Agent Skill · 开发

software-payments(软件支付)

software-payments 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

software-payments 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 11,726。

总安装 1,616周安装 66GitHub Stars 60下载 523核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:software-payments(软件支付)
来源仓库:https://github.com/vasilyu1983/ai-agents-public
仓库路径:skills/software-payments
安装命令:
npx skills add https://github.com/vasilyu1983/ai-agents-public --skill software-payments
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vasilyu1983/ai-agents-public --skill software-payments

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合围绕仓库状态、代码变更或协作事项进行整理和分析。支持对开源项目进行状态跟踪和问题归类。

安装命令:npx skills add https://github.com/vasilyu1983/ai-agents-public --skill software-payments 建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。

来源仓库内路径:skills/software-payments

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vasilyu1983/ai-agents-public --skill software-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

software-payments 怎么安装?

在终端执行 npx skills add https://github.com/vasilyu1983/ai-agents-public --skill software-payments。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

software-payments 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

software-payments 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

software-payments 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

software-payments 用的人多吗?

公开数据是累计安装 1,616 次,近一周安装 66 次,下载 523 次,GitHub 60 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

software-payments 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
software-payments

软件支付 · 本页

1,61660需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Payments & Billing Engineering

Use this skill to design, implement, and debug production payment integrations: checkout flows, subscription management, webhook handling, regional pricing, feature gating, one-time purchases, billing portals, and payment testing.

Defaults bias toward: Stripe as primary processor (most common), webhooks as source of truth, idempotent handlers, lazy-initialized clients, dynamic payment methods, Zod validation at boundaries, structured logging, and fire-and-forget for non-critical tracking. For complex billing, consider a billing orchestrator (Chargebee, Recurly, Lago) on top of Stripe/Adyen.


Quick Reference

TaskDefault PicksNotes
Subscription billingStripe Checkout (hosted)Omit payment_method_types for dynamic methods
MoR / tax complianceStripe Managed Payments / Paddle / LemonSqueezyMoR handles VAT/sales tax for you
Mobile subscriptionsRevenueCatWraps App Store + Google Play
Enterprise / high-volumeAdyen250+ payment methods, interchange++ pricing
Complex billing logicChargebee / Recurly on top of StripePer-seat + usage, contract billing, revenue recognition
Usage-based billingStripe Billing Meters or Lago (open-source)API calls, AI tokens, compute metering
UK Direct DebitGoCardlessBacs/SEPA/ACH DD, lowest involuntary churn
EU multi-methodMollieiDEAL, Bancontact, SEPA DD, Klarna — 25+ methods
Online + POSSquareUnified commerce: online payments + in-person readers
Bank-to-bank (A2A)Open Banking (TrueLayer / Yapily)Zero card fees, instant settlement, no chargebacks
Webhook handlingVerify signature + idempotent handlersStripe retries for 3 days
Feature gatingTier hierarchy + feature matrixCheck at API boundary
One-time purchasesStripe Checkout mode: 'payment'Alongside subscriptions
Billing portalStripe Customer PortalSelf-service management
Regional pricingPPP-adjusted prices per countryUse x-vercel-ip-country or GeoIP
PayPal buttonStripe PayPal method or PayPal Commerce PlatformAvoid Braintree — deprecated 2026, EOL Jan 2027
BNPL (e-commerce)Klarna (via Stripe/Mollie/direct)Split payments; UK regulation expected 2026-27
TestingStripe CLI + test cards4242 4242 4242 4242

Scope

Use this skill to:

  • Implement checkout flows (hosted, embedded, custom)
  • Build subscription lifecycle management (create, upgrade, downgrade, cancel)
  • Handle webhooks reliably (signature verification, idempotency, error handling)
  • Set up regional/multi-currency pricing (PPP, emerging markets)
  • Build feature gating and entitlement systems
  • Implement one-time purchases alongside subscriptions
  • Create billing portal integrations
  • Test payment flows end-to-end
  • Debug common payment integration issues

When NOT to Use This Skill

Use a different skill when:


Decision Tree: Payment Platform Selection

Three platform layers (can be combined):

LayerRoleExamples
Payment ProcessorMoves money, payment methods, fraudStripe, Adyen, Mollie, Square
Merchant of Record (MoR)Handles tax, legal, disputes for youPaddle, LemonSqueezy, Stripe Managed Payments
Billing OrchestratorSubscription logic, dunning, revenue recognitionChargebee, Recurly, Lago (open-source)
Direct DebitBank-account recurring pullsGoCardless (Bacs, SEPA, ACH)
Open Banking (A2A)Bank-to-bank instant paymentsTrueLayer, Yapily
Payment integration needs: [Business Model]

  STEP 1: Choose your processor
    - Default / most common -> Stripe
    - Enterprise, >$1M/yr, 250+ payment methods -> Adyen
    - EU-focused, need iDEAL/Bancontact/SEPA -> Mollie
    - Need PayPal button -> Stripe (PayPal method) or PayPal Commerce Platform
    - WARNING: Do NOT start new projects on Braintree (deprecated 2026, EOL Jan 2027)

  STEP 2: Do you need a MoR?
    - Handle own tax + compliance -> Skip MoR, use processor directly
    - Want tax/VAT/disputes handled -> Stripe Managed Payments, Paddle, LemonSqueezy
    - Indie / small SaaS -> LemonSqueezy (simplest MoR)
    - EU-heavy customer base -> Paddle (strongest EU VAT handling)

  STEP 3: Is billing logic complex?
    - Simple tiers (free/pro/enterprise) -> Stripe Billing is sufficient
    - Per-seat + usage, contract billing, rev-rec -> Chargebee or Recurly on top of Stripe
    - Usage-based (API calls, AI tokens) -> Stripe Billing Meters or Lago (open-source)
    - B2C subscriptions, churn focus -> Recurly (strong revenue recovery)

  STEP 4: Platform-specific needs
    - Mobile app (iOS/Android) -> RevenueCat (wraps both stores)
    - Hybrid (web + app) -> RevenueCat + Stripe (share customer IDs)
    - Marketplace / multi-party -> Stripe Connect
    - UK Direct Debit recurring -> GoCardless (Bacs DD, lowest involuntary churn)
    - Multi-method EU checkout -> Mollie (25+ methods, single integration)
    - Online + in-person POS -> Square (unified commerce)
    - High-value A2A / zero card fees -> Open Banking (TrueLayer)
    - BNPL for e-commerce -> Klarna (via Stripe, Mollie, or direct)
    - One-time digital goods -> Stripe Checkout (payment mode)
    - Physical goods -> Stripe + shipping integration
    - Emerging markets / PPP -> Multiple Stripe Price objects per region
    - Multi-currency -> Stripe multi-currency or Paddle (auto-converts)
    - B2B invoicing -> Stripe Invoicing

For detailed platform comparison tables, see references/platform-comparison.md. For UK/EU-specific platforms (GoCardless, Mollie, Square, Klarna, Open Banking), see references/uk-eu-payments-guide.md.


Stripe Integration Patterns (Feb 2026)

1. Client Initialization

CRITICAL: Lazy-initialize the Stripe client. Import-time initialization fails during build/SSR when env vars aren't available.

// CORRECT: Lazy initialization with proxy for backwards compatibility
import Stripe from 'stripe';

let _stripe: Stripe | null = null;

export function getStripeServer(): Stripe {
  if (!_stripe) {
    const secretKey = process.env.STRIPE_SECRET_KEY;
    if (!secretKey) {
      throw new Error('STRIPE_SECRET_KEY is not configured');
    }
    _stripe = new Stripe(secretKey, {
      apiVersion: '2026-01-28.clover', // Pin to specific version
      typescript: true,
    });
  }
  return _stripe;
}

// Proxy for convenience (backwards-compatible named export)
export const stripe = {
  get customers() { return getStripeServer().customers; },
  get subscriptions() { return getStripeServer().subscriptions; },
  get checkout() { return getStripeServer().checkout; },
  get billingPortal() { return getStripeServer().billingPortal; },
  get webhooks() { return getStripeServer().webhooks; },
};
// WRONG: Crashes during build when STRIPE_SECRET_KEY is undefined
import Stripe from 'stripe';
export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!); // Build failure

2. Checkout Session Creation

CRITICAL: Do NOT set payment_method_types. Omitting it enables Stripe's dynamic payment method selection (Apple Pay, Google Pay, Link, bank transfers, local methods) based on customer region and device.

const session = await stripe.checkout.sessions.create({
  customer: customerId,
  mode: 'subscription',
  // DO NOT set payment_method_types — let Stripe auto-select
  line_items: [{ price: priceId, quantity: 1 }],
  subscription_data: {
    trial_period_days: 7,
    metadata: {
      user_id: userId,
      billing_interval: interval,
    },
  },
  success_url: `${appUrl}/dashboard?checkout=success&tier=${tier}`,
  cancel_url: `${appUrl}/dashboard?checkout=canceled`,
  allow_promotion_codes: true,
  billing_address_collection: 'auto',
  metadata: {
    user_id: userId,
    tier,
    billing_interval: interval,
  },
});
// WRONG: Limits to cards only, blocks Apple Pay, Google Pay, Link, etc.
const session = await stripe.checkout.sessions.create({
  payment_method_types: ['card'], // REMOVE THIS
  // ...
});

3. Webhook Handler Architecture

Webhooks are the source of truth for subscription state. Never trust client-side callbacks alone.

Pattern: read raw body as text → verify stripe.webhooks.constructEvent(body, signature, secret) → switch(event.type) → return {received: true} on success or 500 on handler error (so Stripe retries). Full route implementation in references/stripe-patterns.md.

Essential Webhook Events
EventWhenHandler Pattern
checkout.session.completedCheckout finishesLink Stripe customer to user, create subscription record
checkout.session.expiredAbandoned checkoutFire-and-forget analytics (never fail the response)
customer.subscription.createdNew subscriptionUpsert subscription record with tier, status, period
customer.subscription.updatedPlan change, renewal, cancel-at-period-endUpdate tier, status, cancel flags
customer.subscription.deletedSubscription endsReset to free tier
invoice.payment_succeededSuccessful chargeUpdate period dates, process referral rewards
invoice.payment_failedFailed chargeSet status to past_due
customer.subscription.trial_will_end3 days before trial endsTrigger retention email
Fire-and-Forget Pattern for Non-Critical Tracking

For checkout.session.expired (and similar analytics events): call tracking without await, never throw. Non-critical tracking must not cause a webhook 500.

4. Subscription Tier Model

// Type definitions
export type SubscriptionTier = 'free' | 'starter' | 'pro' | 'enterprise';
export type SubscriptionStatus = 'active' | 'trialing' | 'canceled' | 'past_due' | 'incomplete';
export type BillingInterval = 'month' | 'year';

// Tier hierarchy for comparison
export const TIER_HIERARCHY: Record<SubscriptionTier, number> = {
  free: 0,
  starter: 1,
  pro: 2,
  enterprise: 3,
};

// Feature access matrix
export type Feature = 'basic_dashboard' | 'advanced_reports' | 'api_access' | 'priority_support';

const TIER_FEATURES: Record<SubscriptionTier, Feature[]> = {
  free: ['basic_dashboard'],
  starter: ['basic_dashboard', 'advanced_reports'],
  pro: ['basic_dashboard', 'advanced_reports', 'api_access'],
  enterprise: ['basic_dashboard', 'advanced_reports', 'api_access', 'priority_support'],
};

export function hasFeatureAccess(tier: SubscriptionTier, feature: Feature): boolean {
  return TIER_FEATURES[tier].includes(feature);
}

export function isTierUpgrade(current: SubscriptionTier, target: SubscriptionTier): boolean {
  return (TIER_HIERARCHY[target] ?? 0) > (TIER_HIERARCHY[current] ?? 0);
}

5. Upgrade/Downgrade Flow

Use stripe.subscriptions.update() with proration_behavior: 'create_prorations' and the new price on the existing item. Update local DB immediately; webhook will confirm. See full lifecycle in references/subscription-lifecycle.md.

6. Regional / PPP Pricing

Create separate Stripe Price objects per region (standard vs emerging). Use x-vercel-ip-country or GeoIP for detection. Full implementation and market list in references/regional-pricing-guide.md.

7. One-Time Purchases Alongside Subscriptions

// Some products are one-time (e.g., PDF reports, credits)
// but subscribers get unlimited access
export function hasUnlimitedProductAccess(
  tier: SubscriptionTier,
  status: SubscriptionStatus,
  product: OneTimeProduct
): boolean {
  const isActive = status === 'active' || status === 'trialing';
  if (!isActive) return false;
  const productConfig = ONE_TIME_PRODUCTS[product];
  if (!productConfig.unlimitedFeature) return false;
  return hasFeatureAccess(tier, productConfig.unlimitedFeature);
}

8. Billing Portal

Use stripe.billingPortal.sessions.create() to redirect customers to Stripe's self-service portal for plan changes, payment method updates, and cancellation. See references/stripe-patterns.md for portal configuration checklist.

9. Referral/Coupon Integration

Key constraint: allow_promotion_codes and discounts are mutually exclusive in Stripe Checkout. If a referral coupon applies, set discounts: [{coupon: REFERRAL_COUPON_ID}] and omit allow_promotion_codes. On invoice.payment_succeeded with billing_reason === 'subscription_create', reward the referrer via stripe.customers.createBalanceTransaction().


Feature Gating Patterns

Every paid feature requires enforcement at 3 layers: Feature Registry (maps features to tiers), API Enforcement (returns 403), UI Paywall (shows upgrade CTA). Missing any layer creates a security hole or broken UX.

Key anti-patterns:

  • Gate on Wrong Key: If the feature key is in the free tier, the gate is a permanent no-op.
  • Polymorphic Field Shapes: transits: Transit[] | {__gated: true} crashes (data.transits || []).sort(). Use consistent shapes with an explicit transitsGated: boolean flag.
  • Checkout Mutual Exclusivity: allow_promotion_codes + discounts together = Stripe rejects.

Always verify Stripe SDK TypeScript types (node_modules/stripe/types/), not documentation examples.

For detailed gating architecture (consumables, fraud prevention, discriminated unions), see references/feature-gating-patterns.md.


Stripe API Version Notes

Current version: 2026-01-28.clover. Key breaking change: invoice.subscription replaced by invoice.parent.subscription_details since 2025-11-17.clover. Full version table and migration code in references/stripe-patterns.md.


Common Mistakes and Anti-Patterns

FAIL AvoidPASS InsteadWhy
payment_method_types: ['card']Omit the field entirelyBlocks Apple Pay, Google Pay, Link, local methods
Trusting client-side checkout callbackUse webhooks as source of truthClient can close browser before callback
new Stripe(key) at module top levelLazy-initialize in a functionBuild fails when env var is undefined
Catching webhook errors silentlyLog + return 500 so Stripe retriesLost events = lost revenue
Storing subscription state only client-sideSync from webhook to DBSingle source of truth
Hardcoding prices in codeUse Stripe Price objects via env varsPrices change, regional variants
Skipping webhook signature verificationAlways verify with constructEvent()Prevents replay/spoofing attacks
Using invoice.subscription (2025+)Use invoice.parent.subscription_detailsBreaking change since 2025-11-17.clover
await on fire-and-forget analyticsDon't await, don't throwNon-critical tracking must not fail webhooks
Missing UUID validation on user_id from metadataValidate with regex before DB operationsPrevents injection and corrupt data
Creating checkout without checking existing subscriptionCheck and use upgrade flow if activePrevents duplicate subscriptions
Using --no-verify for Stripe webhook testingUse Stripe CLI: stripe listen --forward-toReal signature verification in dev

E2E Testing Patterns

Quick reference — full patterns in references/testing-patterns.md.

# Stripe CLI: forward events to local webhook endpoint
stripe listen --forward-to localhost:3001/api/stripe/webhook

# Trigger specific events
stripe trigger checkout.session.completed
stripe trigger invoice.payment_failed
CardScenario
4242 4242 4242 4242Successful payment
4000 0000 0000 0002Declined
4000 0000 0000 32203D Secure required
4000 0000 0000 9995Insufficient funds

Checkout Contract Propagation

When checkout API response contracts change, treat it as a cross-surface migration. Enumerate all entrypoints, update every caller, route blocked flows to one shared recovery UX. Full checklist in references/in-app-browser-checkout-contract.md and assets/template-checkout-entrypoint-propagation-checklist.md.

Security Checklist

10-point checklist covering webhook signature verification, secrets management, UUID validation, HTTPS, idempotency, and rate limiting. Full checklist in references/stripe-patterns.md.


Navigation

References

Templates

Related Skills


Freshness Protocol

When users ask version-sensitive questions about payment platforms, do a freshness check.

Trigger Conditions

  • "What's the best payment platform for [use case]?"
  • "Stripe vs Paddle vs LemonSqueezy?"
  • "How do I handle [tax/VAT/sales tax]?"
  • "What's new in Stripe [API/Billing/Checkout]?"
  • "Is Stripe Managed Payments available?"
  • "Best mobile subscription SDK?"

How to Freshness-Check

  1. Start from data/sources.json (official docs, changelogs, API versions).
  2. Run a targeted web search for the specific platform and feature.
  3. Prefer official documentation and changelogs over blog posts.

What to Report

  • Current landscape: what is stable and widely used now
  • Emerging trends: Managed Payments, usage-based billing, entitlements API, Open Banking
  • Deprecated/declining: hardcoded payment_method_types, top-level invoice.subscription, Braintree
  • Recommendation: default choice + alternatives with trade-offs

Ops Runbook

For checkout 500 errors with RLS/authorization denials: 5-step incident loop, required logging fields, and guardrails. See references/ops-runbook-checkout-errors.md.

Fact-Checking

  • Use web search/web fetch to verify current external facts, versions, pricing, deadlines, regulations, or platform behavior before final answers.
  • Prefer primary sources; report source links and dates for volatile information.
  • If web access is unavailable, state the limitation and mark guidance as unverified.

平台分布

Codex

35.37%
按下载量换算185

Claude

28.61%
按下载量换算150

Cursor

17.53%
按下载量换算92

Gemini CLI

8.71%
按下载量换算46

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills