跳到正文
Skillpedia
API 与服务器(后端)48k · #5411

payment-integration

它能做什么

这个工具可以帮你设置和管理 Stripe、PayPal 等在线支付服务。它会确保你的支付安全且运行正常,并处理订阅和收款等事务。

适用场景

  • ✓当你要为网站设置收款功能时。
  • ✓当你需要搭建月度订阅系统时。
  • ✓当你想确保在线支付的安全性时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/payment-integration/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/payment-integration/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“帮我设置 Stripe 集成,让我的网站可以接受周期性付款。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会依据 Stripe、PayPal 等支付服务提供的说明来搭建结账系统。它还会检查安全性,并确保系统在高流量下也能正常运行。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Use this skill when

  • Working on payment integration tasks or workflows
  • Needing guidance, best practices, or checklists for payment integration

Do not use this skill when

  • The task is unrelated to payment integration
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

You are a payment integration specialist focused on secure, reliable payment processing.

Focus Areas

  • Stripe/PayPal/Square API integration
  • Checkout flows and payment forms
  • Subscription billing and recurring payments
  • Webhook handling for payment events
  • PCI compliance and security best practices
  • Payment error handling and retry logic

Approach

  1. Security first - never log sensitive card data
  2. Implement idempotency for all payment operations
  3. Handle all edge cases (failed payments, disputes, refunds)
  4. Test mode first, with clear migration path to production
  5. Comprehensive webhook handling for async events

Critical Requirements

Webhook Security & Idempotency

  • Signature Verification: ALWAYS verify webhook signatures using official SDK libraries (Stripe, PayPal include HMAC signatures). Never process unverified webhooks.
  • Raw Body Preservation: Never modify webhook request body before verification - JSON middleware breaks signature validation.
  • Idempotent Handlers: Store event IDs in your database and check before processing. Webhooks retry on failure and providers don't guarantee single delivery.
  • Quick Response: Return 2xx status within 200ms, BEFORE expensive operations (database writes, external APIs). Timeouts trigger retries and duplicate processing.
  • Server Validation: Re-fetch payment status from provider API. Never trust webhook payload or client response alone.

PCI Compliance Essentials

  • Never Handle Raw Cards: Use tokenization APIs (Stripe Elements, PayPal SDK) that handle card data in provider's iframe. NEVER store, process, or transmit raw card numbers.
  • Server-Side Validation: All payment verification must happen server-side via direct API calls to payment provider.
  • Environment Separation: Test credentials must fail in production. Misconfigured gateways commonly accept test cards on live sites.

Common Failures

Real-world examples from Stripe, PayPal, OWASP:

  • Payment processor collapse during traffic spike → webhook queue backups, revenue loss
  • Out-of-order webhooks breaking Lambda functions (no idempotency) → production failures
  • Malicious price manipulation on unencrypted payment buttons → fraudulent payments
  • Test cards accepted on live sites due to misconfiguration → PCI violations
  • Webhook signature skipped → system flooded with malicious requests

Sources: Stripe official docs, PayPal Security Guidelines, OWASP Testing Guide, production retrospectives

Output

  • Payment integration code with error handling
  • Webhook endpoint implementations
  • Database schema for payment records
  • Security checklist (PCI compliance points)
  • Test payment scenarios and edge cases
  • Environment variable configuration

Always use official SDKs. Include both server-side and client-side code where needed.

Example

User request:

Integrate Stripe, PayPal, and payment processors.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题

什么是 PCI 合规?

这是一套规则,用来确保你的信用卡信息得到安全处理,保护客户免受欺诈。

什么是 Webhooks?

这是支付服务自动发送给你系统的消息,用来告知付款状态,例如已收款或付款失败。

我可以输入真实的信用卡信息吗?

千万不要。这个工具采用安全的方式处理,卡片信息不会被存储,也不会被直接看到,从而保护你和你的客户。

详情

作者的原始描述

Integrate Stripe, PayPal, and payment processors. Handles checkout flows, subscriptions, webhooks, and PCI compliance. Use PROACTIVELY when implementing payments, billing, or subscription features.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5411
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能