360 Secure SkillHub
360 安全技能中心

Stripe Best Practices

该 Skill 以知识条目形式给出 Stripe 支付集成规范:明确禁止 Charges/Sources/Tokens/Card Element 等旧方案,推荐 CheckoutSessions、Payment Element、SetupIntents、Billing APIs 与 controller 属性,并按用户诉求(订阅、市场平台、PAN 迁移、旧接口迁移)给出决策与官方文档参考链接,本…

ifoster01
ifoster01
热度 92.99
最近更新 2026-05-11 15:54:29
分类:知识依赖:纯提示词应用场景:API 集成 / 概念解释 / 推荐

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add stripe-best-practices
Metadata
name
stripe-best-practices
description
Best practices for building Stripe payment integrations
metadata
{"version":"245b3bbb","type":"knowledge","format":"uasp"}

Stripe Best Practices

Best practices for building Stripe payment integrations

Keywords

stripe, payment, checkout, subscription, billing

Intents

  • integrate payment processing
  • handle subscriptions
  • process credit cards

Constraints

Never

  • Charges API
  • Sources API
  • Card Element
  • Payment Element in card-only mode
  • Tokens API (unless specific need)
  • mixing Connect charge types
  • legacy Connect terms (Standard/Express/Custom)

Always

  • latest API/SDK version (unless specified otherwise)
  • advise PCI compliance proof for raw PAN handling
  • use controller properties for Connect (not legacy terms)

Preferences

  • Prefer CheckoutSessions over PaymentIntents when on-session payments
  • Prefer Stripe-hosted Checkout over embedded Checkout when default choice
  • Prefer embedded Checkout over Payment Element when more control needed
  • Prefer dynamic payment methods over explicit payment_method_types when using Payment Element
  • Prefer SetupIntents over Sources when saving payment methods
  • Prefer Confirmation Tokens over createPaymentMethod/createToken when inspecting card before payment
  • Prefer Billing APIs over raw PaymentIntents when subscriptions/recurring
  • Prefer direct charges over destination charges when platform wants Stripe to take risk
  • Prefer destination charges over direct charges when platform accepts liability

Decisions

  • When user wants Charges API: advise migration to CheckoutSessions or PaymentIntents
  • When user wants Card Element: advise migration to Payment Element
  • When recurring revenue / subscription / SaaS: recommend Billing APIs + Checkout frontend
  • When platform / marketplace / Connect: follow integration recommendations, use controller properties
  • When migrating PAN data from another processor: point to migration process
  • When render Payment Element before creating intent: use Confirmation Tokens

References


Converted from UASP format (knowledge skill)