我正在使用Stripe设置定期付款。 我正在使用react-stripe-elements收集信用卡信息,看起来有两种方法可以保存卡片以便日后使用:
this.props.stripe.createToken()
this.props.stripe.createSource()
然后在后端创建客户:
stripe.customers.create({ source: tokenId })
stripe.customers.create({ source: sourceId })
结果在Stripe仪表板中显示如下:
- sourceId卡片
我的问题是这两种模式的区别是什么?我应该使用其中一种吗?我注意到在 tokenId 模式中,卡片显示了 cvc/zip 检查已通过,而在 sourceId 模式中,卡片并没有显示。但是,sourceId 模式还明确表示卡片可以充值和重复使用,这是否意味着使用 tokenId 模式保存的卡片不可重复使用?sourceId 卡片中的日志/事件更有用吗?两种模式的返回对象结构也不同。
如果能得到任何帮助,将不胜感激,提前致谢!