From claude-code-starter
Integrates payment systems like Stripe, LemonSqueezy, or Paddle for one-time purchases and subscriptions. Covers backend APIs, frontend checkout, webhooks, security, and testing.
npx claudepluginhub lighthouse-strategy/claude-code-starterThis skill uses the workspace's default tool permissions.
帮用户集成在线支付,实现收款。
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
帮用户集成在线支付,实现收款。
问题 1:支付类型
你需要什么类型的支付?
- 一次性付款(买商品、买服务)
- 订阅/会员(按月/按年收费)
- 两者都要
问题 2:定价
价格是多少?如果是订阅,月费和年费分别是多少?
问题 3:目标客户地区
客户主要在哪里?这决定了支付方式的选择。
根据需求推荐:
| 服务商 | 适用场景 | 特点 |
|---|---|---|
| Stripe | 国际客户,需要灵活定制 | 功能最全,开发者体验好,需自行处理税务 |
| LemonSqueezy | SaaS/数字产品 | 自动处理全球销售税,API 更简单,适合独立开发者 |
| Paddle | SaaS 订阅为主 | 作为 Merchant of Record 处理税务+发票,合规省心 |
注意:如果客户在中国大陆,Stripe 对国内用户支付支持有限。建议额外集成支付宝/微信支付(可通过 Stripe 的 Alipay/WeChat Pay 支付方式,或直接对接支付宝开放平台)。
不确定就用 Stripe(生态最大,文档最全)。
后端:
前端:
订阅(如果需要):
Webhook 是支付系统的核心通信通道,必须做好安全防护:
使用测试卡号完成端到端验证(Stripe 测试卡:4242 4242 4242 4242,任意未来日期,任意 CVC):
支付功能已集成,测试模式验证正常。 上线前:切换到生产模式 API Key,配置生产 Webhook 端点。
stripe listen --forward-to localhost:端口/webhook) 转发事件。部署后确认 Webhook URL 在服务商后台已正确配置且状态为 Activesk_test_ 开头,生产 Key 以 sk_live_ 开头。两套 Key 的数据完全隔离。常见错误:用生产 Key 查测试订单,或反过来