新 PaymentMethod 的 Stripe SetupIntent 更新流程

Stripe SetupIntent update flow for a new PaymentMethod

我们正在创建一个允许用户在未来付款时附加卡的网站。

在第一次尝试时,我们正在创建一个 SetupIntentPaymentMethod(卡)- https://stripe.com/docs/payments/save-and-reuse.

现在假设用户要删除当前卡并附加一张新卡。 我们无法将指定的付款方式更改为 SetupIntent 或取消 SetupIntent,因为

"You cannot cancel this SetupIntent because it has a status of succeeded."

也许我不太明白,但是在保存并重复使用示例中,我如何允许用户移除卡片并附加一张新卡片?

或者是这样设计的 SetupIntent 只支持 PaymentMethod 认证,对于新卡来说就足够了断开(分离)当前的 PaymentMethod,保持 SetupIntent 不变并创建一个新的 SetupIntent + PaymentMethod对?

通过 SetupIntent 设置 PaymentMethod 后,您将不再通过该 SetupIntent 执行任何操作(successful 是终止状态)。您稍后 detach the PaymentMethod from the Customer,如果您想稍后添加 different/new PaymentMethod,and/or 您将再次遵循 SetupIntent 流程(使用新的 SetupIntent)。