payment-integration
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePayment Integration
支付集成
Purpose
用途
Provides expertise in integrating payment gateways and designing PCI-compliant billing systems. Specializes in implementing checkout flows, subscription management, and payment processing with providers like Stripe, PayPal, and Adyen.
提供支付网关集成及符合PCI合规要求的计费系统设计相关专业支持。专注于基于Stripe、PayPal、Adyen等服务商实现结账流程、订阅管理及支付处理功能。
When to Use
适用场景
- Integrating Stripe, PayPal, or other payment gateways
- Implementing checkout and payment flows
- Building subscription billing systems
- Ensuring PCI-DSS compliance
- Handling payment webhooks
- Implementing payment retry logic
- Setting up multi-currency payments
- Building invoicing systems
- 集成Stripe、PayPal或其他支付网关
- 实现结账与支付流程
- 构建订阅计费系统
- 确保符合PCI-DSS合规要求
- 处理支付Webhook
- 实现支付重试逻辑
- 配置多币种支付
- 构建发票系统
Quick Start
快速入门
Invoke this skill when:
- Integrating payment gateways (Stripe, PayPal, Adyen)
- Building checkout or subscription flows
- Designing PCI-compliant payment systems
- Implementing webhook handlers for payments
- Setting up recurring billing
Do NOT invoke when:
- General ledger/accounting systems → use
/fintech-engineer - API design without payment focus → use
/api-designer - Frontend checkout UI only → use
/frontend-design - Security audit → use
/security-auditor
在以下场景调用此技能:
- 集成支付网关(Stripe、PayPal、Adyen)
- 构建结账或订阅流程
- 设计符合PCI合规要求的支付系统
- 实现支付Webhook处理程序
- 配置定期计费
请勿在以下场景调用:
- 总账/会计系统 → 使用
/fintech-engineer - 非支付聚焦的API设计 → 使用
/api-designer - 仅前端结账UI → 使用
/frontend-design - 安全审计 → 使用
/security-auditor
Decision Framework
决策框架
Payment Use Case?
├── One-time Purchase
│ └── Stripe Checkout / PayPal Buttons
├── Subscription
│ └── Stripe Billing / Recurly
├── Marketplace/Split Payments
│ └── Stripe Connect / PayPal Commerce
├── Enterprise/B2B
│ └── Invoicing with NET terms
└── Global Payments
└── Adyen / Multi-gateway strategyPayment Use Case?
├── One-time Purchase
│ └── Stripe Checkout / PayPal Buttons
├── Subscription
│ └── Stripe Billing / Recurly
├── Marketplace/Split Payments
│ └── Stripe Connect / PayPal Commerce
├── Enterprise/B2B
│ └── Invoicing with NET terms
└── Global Payments
└── Adyen / Multi-gateway strategyCore Workflows
核心工作流
1. Stripe Integration
1. Stripe集成
- Set up Stripe account and API keys
- Create products and prices
- Implement Checkout Session or Elements
- Handle payment confirmation
- Set up webhook endpoint
- Process webhook events (succeeded, failed)
- 搭建Stripe账户并获取API密钥
- 创建产品与定价
- 实现Checkout Session或Elements
- 处理支付确认
- 配置Webhook端点
- 处理Webhook事件(成功、失败)
2. Subscription Billing
2. 订阅计费
- Define subscription plans and pricing
- Create customer in payment provider
- Implement subscription creation flow
- Handle trial periods
- Manage upgrades/downgrades
- Implement dunning for failed payments
- 定义订阅方案与定价
- 在支付服务商系统中创建客户
- 实现订阅创建流程
- 处理试用期
- 管理订阅升级/降级
- 实现失败支付的催缴机制
3. Webhook Handling
3. Webhook处理
- Create secure webhook endpoint
- Verify webhook signatures
- Make handlers idempotent
- Process events in order
- Handle retry scenarios
- Log all webhook events
- 创建安全的Webhook端点
- 验证Webhook签名
- 确保处理程序具备幂等性
- 按顺序处理事件
- 处理重试场景
- 记录所有Webhook事件
Best Practices
最佳实践
- Never store full card numbers—use tokenization
- Always verify webhook signatures
- Implement idempotency for payment operations
- Use test mode thoroughly before production
- Handle all payment states (pending, succeeded, failed)
- Store payment provider IDs for reconciliation
- 切勿存储完整卡号——使用令牌化技术
- 始终验证Webhook签名
- 为支付操作实现幂等性
- 上线前充分使用测试环境
- 处理所有支付状态(待处理、成功、失败)
- 存储支付服务商ID用于对账
Anti-Patterns
反模式
| Anti-Pattern | Problem | Correct Approach |
|---|---|---|
| Storing card numbers | PCI violation | Use tokenization |
| No webhook verification | Security risk | Verify signatures |
| Synchronous payment only | Poor UX, timeouts | Async with webhooks |
| Missing idempotency | Duplicate charges | Idempotency keys |
| No retry logic | Lost revenue | Implement dunning |
| 反模式 | 问题 | 正确做法 |
|---|---|---|
| 存储卡号 | 违反PCI合规要求 | 使用令牌化技术 |
| 未验证Webhook签名 | 安全风险 | 验证签名 |
| 仅支持同步支付 | 用户体验差、易超时 | 结合Webhook实现异步处理 |
| 未实现幂等性 | 重复扣费 | 使用幂等键 |
| 无重试逻辑 | 收入损失 | 实现催缴机制 |