Reputation: 1036
I spent the last two days pouring over the stripe documentation, but can't I find how to add a card to an "account" in stripe.
Q. How to attach a debit-card for payouts to stripe.accounts.create
?
stripe.accounts.create({
type: 'standard',
business_type: 'individual',
default_currency:'USD',
country: 'US',
email: '[email protected]',
requested_capabilities: [ 'transfers' ],
// here ?
}).then(acc => {
// or maybe ?
}).catch(console.error)
Also, an example on how to select that payment method to payout to would be appreciated.
Thanks for any input
Upvotes: 0
Views: 454
Reputation: 1014
With in your counts.create()
fn, add an attribute "external_account"
e.g.
stripe.accounts.create({
country: 'US',
default_currency:'USD',
external_account:card_token,
type: 'custom',
requested_capabilities: ['card_payments', 'transfers'],
})
.then(acc => {
Note you may need to change your type to "custom" AND you cant use a payment_method
see Create a card token
Upvotes: 1
Reputation: 3311
You would tokenize a debit card using Stripe.js and Elements [0], then attach it to the Connect account as an external account: stripe.com/docs/api/external_account_cards/create
[0] stripe.com/docs/js/tokens_sources/create_token?type=cardElement
Upvotes: 1