如何在不支付任何费用的情况下检查条纹卡是否有效并且仍在使用

How to check stripe card is valid and is still working without making any payment

我正在开发一个网络应用程序,其中我有用户的条带客户 ID。我检查了文档,发现当我们将用户卡存储在条带上时,条带会检查它是否有效并在当时工作。

另一方面,当付款完成后,我们可以通过条带的响应来检查卡是否有效并且可以正常工作。

But in my case I have a flow where I payment is going to complete after the appointment is completed and I have to check if the card is working and valid before creating an appointment in database. If card is working we will create an appointment and if not then we will ask to user to add new card as previous is not working and after successful card addition we will proceed.

遗憾的是,无法重新验证已附加到客户的卡。

如果您真的想再次验证卡,则需要使用同一张卡创建一个新的 PaymentMethod 并将其附加到客户。