Stripe 更新客户的银行卡信息

Stripe Updating a customer's card info

我正在尝试在 php 中实施 Stripe,并且尽量避免使用 html 表单,而是调用 Stripe Hosted Checkout 页面进行首次订阅付款。但是,如果以后的发票由于卡过期而导致付款失败,我希望我的客户能够更新他的卡信息(或者我可以在属于同一个人的 Stripe 中创建一个新的客户对象)但是重要的部分是我希望他以条纹托管形式输入他的新信用卡信息,以验证他的新卡号,CVV ... 有什么办法吗?


目前我正在这样做:

document.getElementById("subscribe-now").addEventListener("click", function(evt) {
    createCheckoutSession('<?php echo Config::SUBSCRIPTION_PLAN_ID; ?>').then(function(data) {
      stripe.redirectToCheckout({
          sessionId: data.id
      }).then(handleResult);
    });

是的,Customer Portal. Similar to Checkout, this is a Stripe-hosted service that allows your customers to manage subscriptions and saved payment methods according to the configuration you provide, and you redirect your customers 支持它。

Preview here.