#putte
1 messages · Page 1 of 1 (latest)
hello! you'll probably want to take a look at this guide : https://stripe.com/docs/connect/payouts-bank-accounts
If you want to manually create and attach a bank account to a custom account, you'll want to use this API : https://stripe.com/docs/api/external_account_bank_accounts/create
e.g.
const bankAccount = await stripe.accounts.createExternalAccount(
'acct_...',
{
external_account: {
object:'bank_account',
country : 'US',
currency : 'USD',
routing_number: '110000000',
account_number : '000123456789',
},
}
);
you can find test bank account numbers that you can use here : https://stripe.com/docs/connect/testing#account-numbers
Alright thanks! When I make the transfer, I still refer to the account id and not the externalAccount id I guess?
Is there a way to attach card details there instead of bank number?
yes, when you create a Transfer, you refer to the account id : https://stripe.com/docs/api/transfers/create#create_transfer-destination
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is there a way to attach card details there instead of bank number?
it's possible yes, let me test something before getting back to you
Thanks Alex
so you'll want to collect the card details using the Card Element e.g. https://jsfiddle.net/ywain/rprufyg5/
then subsequently use this API to attach the token to the connected account : https://stripe.com/docs/api/external_account_cards/create
e.g.
const card = await stripe.accounts.createExternalAccount(
'acct_...',
{external_account: 'tok_...'}
);