Stripe 需要将您的产品存储在其平台以进行支付处理吗?

huangapple go评论77阅读模式
英文:

Do you have to store your products in Stripe to process payment

问题

Stripe是否要求产品在其系统中才能进行支付处理?根据他们的文档,我没有看到明确的答案,所以我不确定。

英文:

I'm building a new web application, and we have a system that manages our products already. Does Stripe require the products to be in their system in order to be able to handle the payment processing? I don't see a clear answer to this via their docs, so I'm unsure.

答案1

得分: 0

No. 在你向Stripe发起API请求以处理客户付款时,你需要传递一些关于价格、货币等基本信息。

价格 可以直接从你的数据库中获取,或者作为来自前端的变量传递。

令牌 是从前端传递的,包括客户的付款信息。

所以不需要将你的产品存储在Stripe中。

function createCharge(token, amount) {
     return stripe.charges.create({
         amount: amount * 100,
         currency: 'usd',
         source: token,
         description: "..."
     })
}
英文:

No. As part of the API request you make to stripe to process your clients payment, you need to pass some basic info about price, currency, etc.

The price you can simply retrieve from your DB, or pass as a variable from the FE.

The token is what is passed in from the FE, and includes the clients payment info.

So no need to store your products with stripe.

function createCharge(token, amount) {
     return stripe.charges.create({
         amount: amount * 100,
         currency: 'usd',
         source: token,
         description: "..."
     })
}

huangapple
  • 本文由 发表于 2023年3月12日 11:22:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/75710891.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定