Stripe.js 保留多个支付令牌
Stripe.js Keep Multiple Payment Tokens
我已经能够在我的应用程序的客户端(javascript、angularjs、jquery)代码中实现 Stripe.js,以及后端(c#、web api)使用 Stripe.net。但是,我 运行 遇到了一个似乎在我能找到的任何地方都没有答案的问题。
当我们在我们的应用程序中向用户收取某件商品的费用时,他们可能希望稍后回来购买另一件商品,而无需重新输入信用卡信息。因此,我们通过条带创建一个客户对象来存储信用卡令牌。
我的问题是,是否有某种方法可以在单个客户对象上存储多个令牌,以便我们可以重复使用相同的支付信息,同时也允许客户拥有多种支付方式?我是否应该为每种付款方式创建一个新客户,并将他们的 ID 存储在我客户的用户模型中?
谢谢!
一个客户绝对可以拥有多个支付渠道。
您可以create cards or bank accounts将它们添加为现有客户的付款来源。
当您 create a charge using the customer
parameter only, the customer's default source will be charged. If you want to charge a non-default source, you need to use both the customer
parameter (set to the customer's ID) and the source
参数(设置为卡或银行帐户的 ID)时。
要更改客户的默认来源,您需要 update the customer with the ID of the new default source in the default_source
参数。
我已经能够在我的应用程序的客户端(javascript、angularjs、jquery)代码中实现 Stripe.js,以及后端(c#、web api)使用 Stripe.net。但是,我 运行 遇到了一个似乎在我能找到的任何地方都没有答案的问题。
当我们在我们的应用程序中向用户收取某件商品的费用时,他们可能希望稍后回来购买另一件商品,而无需重新输入信用卡信息。因此,我们通过条带创建一个客户对象来存储信用卡令牌。
我的问题是,是否有某种方法可以在单个客户对象上存储多个令牌,以便我们可以重复使用相同的支付信息,同时也允许客户拥有多种支付方式?我是否应该为每种付款方式创建一个新客户,并将他们的 ID 存储在我客户的用户模型中?
谢谢!
一个客户绝对可以拥有多个支付渠道。
您可以create cards or bank accounts将它们添加为现有客户的付款来源。
当您 create a charge using the customer
parameter only, the customer's default source will be charged. If you want to charge a non-default source, you need to use both the customer
parameter (set to the customer's ID) and the source
参数(设置为卡或银行帐户的 ID)时。
要更改客户的默认来源,您需要 update the customer with the ID of the new default source in the default_source
参数。