使用 rails 条带化付款意向
Stripe payment intent with rails
我在我的 rails 应用程序中使用条纹订阅付款来向我网站上的客户收费。条带订阅付款方式是否使用条带 paymentIntents,或者我应该迁移到支付 Intentets 创建而不是支付订阅?
Stripe::Subscription.create(
customer: user.stripe_id,
items: [{ plan: plan.stripe_id }]
)
它已经收费,但我需要知道我是否应该迁移到付款意向。
我会坚持订阅 API。 Subscription
应该会自动创建必要的 Payment Intent
。
如果您过去使用过订阅,那么有必要阅读一下流程的变化。从历史上看,您的 Stripe::Subscription.create
调用要么会产生费用并开始订阅,要么会失败并引发异常。
那有changed with newer API versions. Now a Subscription will be created regardless of whether the initial charge succeeds or fails, but it can end up in an incomplete state, and you will need to take appropriate action to add a new payment method or have the user to authenticate their card.
我在我的 rails 应用程序中使用条纹订阅付款来向我网站上的客户收费。条带订阅付款方式是否使用条带 paymentIntents,或者我应该迁移到支付 Intentets 创建而不是支付订阅?
Stripe::Subscription.create(
customer: user.stripe_id,
items: [{ plan: plan.stripe_id }]
)
它已经收费,但我需要知道我是否应该迁移到付款意向。
我会坚持订阅 API。 Subscription
应该会自动创建必要的 Payment Intent
。
如果您过去使用过订阅,那么有必要阅读一下流程的变化。从历史上看,您的 Stripe::Subscription.create
调用要么会产生费用并开始订阅,要么会失败并引发异常。
那有changed with newer API versions. Now a Subscription will be created regardless of whether the initial charge succeeds or fails, but it can end up in an incomplete state, and you will need to take appropriate action to add a new payment method or have the user to authenticate their card.