简体   繁体   English

Stripe - 在没有付款的情况下为客户添加一张卡

[英]Stripe - add a card for customer without payment

I have a customer that is logged into my application.我有一个客户登录了我的应用程序。

const customerId = '1234';

I want him to be able to add a card so he can use it later for purchasing items in my shop.我希望他能够添加一张卡,以便他以后可以使用它在我的商店购买商品。

But theres many of possible requests and im not really sure which one should be used in such situation.但是有很多可能的请求,我不确定在这种情况下应该使用哪一个。

createSource();
createPaymentMethod();
createSetupIntent();

What is the proper way in Stripe to add a card by customer? Stripe 中按客户添加卡的正确方法是什么?

You'd use Setup Intents which will facilitate the authentication and saving of payment details to an existing Customer object. There's a guide here on how to achieve this.您将使用Setup Intents ,这将有助于对现有客户 object 进行身份验证和付款详细信息的保存。这里有一个关于如何实现此目的的指南。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM