我花了两天时间仔细研究了 stripe 文档,但我找不到如何将卡添加到 stripe 中的“帐户”。
问。如何将用于付款的借记卡附加到 stripe.accounts.create
?
stripe.accounts.create({
type: 'standard',
business_type: 'individual',
default_currency:'USD',
country: 'US',
email: 'bob@example.com',
requested_capabilities: [ 'transfers' ],
// here ?
}).then(acc => {
// or maybe ?
}).catch(console.error)
此外,如果能提供有关如何选择付款方式的示例,我们将不胜感激。
感谢您的任何意见
在您的 counts.create()
fn 中,添加属性“external_account”
例如
stripe.accounts.create({
country: 'US',
default_currency:'USD',
external_account:card_token,
type: 'custom',
requested_capabilities: ['card_payments', 'transfers'],
})
.then(acc => {
请注意,您可能需要将类型更改为“自定义”,并且无法使用 payment_method
,请参阅 Create a card token
我是一名优秀的程序员,十分优秀!