#vtor_connect-externalaccount
1 messages · Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- vitor_connect-embedded-onboarding, 2 days ago, 33 messages
👋 Welcome to your new thread!
⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1254820624279404646
📝 Have more to share? Add details, code, screenshots, videos, etc. below.
Gotcha and what type of Connected Accounts are you working with here?
import { ConnectComponentsProvider, ConnectAccountOnboarding } from "@stripe/react-connect-js";
im creating custom accs
// Create a new Stripe account for the user const account = await stripe.accounts.create({ type: 'custom', country: 'BR', email: data.email, capabilities: { card_payments: { requested: true }, transfers: { requested: true } }, business_type: 'individual', });
Okay and are you collecting external accounts via Hosted Onboarding here? Specifically in your Dashboard here: https://dashboard.stripe.com/test/settings/connect/payouts/external_accounts is Collect external account information for Custom accounts enabled?
hmm im not sure i understood
i create acc > create session > would expect embedded form
Sure and when you do that you see a button which then opens up a modal to collect an email/password, correct?
Or do you not see an embedded button at all?
Okay so yeah that button which leads to a popout modal is because you are collecting external accounts via embedded onboarding. This means that your users need to enter an email/password so that they can manage their external account. That occurs in a new window.
If you collect external accounts yourself, then this would not happen and the entire onboarding flow would be embedded
ok
so how can i do this?
how can i collect external accs myself? and what exactly are external accs?
External Accounts are bank accounts or debit cards that are used to payout your Connected Accounts. See: https://docs.stripe.com/connect/payouts-bank-accounts with information on how you would do this yourself without using Hosted Onboarding
so
would i need to pass and give this information of external accs on the create stripe connect account or create stripe connect session?
on which moment exactly /
Yes either on creation (https://docs.stripe.com/api/accounts/create#create_account-external_account) or you can do it later on via update (https://docs.stripe.com/api/accounts/update#update_account-external_account)
ok
so what exact information do i need to pass in this code?
const account = await stripe.accounts.create({ type: 'custom', country: 'BR', email: data.email, capabilities: { card_payments: { requested: true }, transfers: { requested: true } }, business_type: 'individual', });
Hello bismark is stepping out soon so I am taking over the thread. Catching up now...
ok
So as those doc sections say, you can pass the same parameters that the create external account call needs or you can separately create a token and then pass that. I'd suggest trying the first method as that is less API calls
https://docs.stripe.com/api/external_account_bank_accounts/create
https://docs.stripe.com/api/tokens/create_bank_account
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
im not understanding
// Create a new Stripe account for the user const account = await stripe.accounts.create({ type: 'custom', country: 'BR', email: data.email, capabilities: { card_payments: { requested: true }, transfers: { requested: true } }, business_type: 'individual', });
what fiels should i add here?
should i do this
const externalAccount = await stripe.accounts.createExternalAccount( 'acct_1032D82eZvKYlo2C', { external_account: 'btok_1NAiJy2eZvKYlo2Cnh6bIs9c', } );
then this
// Create a new Stripe account for the user const account = await stripe.accounts.create({ type: 'custom', country: 'BR', email: data.email, capabilities: { card_payments: { requested: true }, transfers: { requested: true } }, business_type: 'individual', });
or should i do this
// Create a new Stripe account for the user const account = await stripe.accounts.create({ type: 'custom', country: 'BR', email: data.email, externalAccount = await stripe.accounts.createExternalAccount( 'acct_1032D82eZvKYlo2C', { external_account: 'btok_1NAiJy2eZvKYlo2Cnh6bIs9c' }, capabilities: { card_payments: { requested: true }, transfers: { requested: true } }, business_type: 'individual', });
externalAccount = await stripe.accounts.createExternalAccount( 'acct_1032D82eZvKYlo2C', { external_account: 'btok_1NAiJy2eZvKYlo2Cnh6bIs9c', }
in acct_1032D82eZvKYlo2C is this the acc id ?
You can do the btok token, the alternative is passing account_number, country, currency, account_holder_name, and account_holder_type to the external_account hash in your account creation call
Wait whoops I edited the wrong example of yours
Is this helpful?
type: 'custom',
country: 'BR',
email: data.email,
capabilities: {
card_payments: { requested: true },
transfers: { requested: true }
},
business_type: 'individual',
external_account: {
account_number: '12345',
country: 'US',
...
}
});```
so not use the btok token ?
external_account: { account_number: '12345', country: 'US', ...
but i woudlnt have acc number or country before creating them?
shouldn't i create the external account on the stripe.accounts.create?
Correct, that is how you pass the data directly in to the call instead of using a bank account token. If you don't want that pop up modal, you will need to collect these details yourself at some point. If you don't want to do this on account creation, you can do the same thing from that create call except in an update call after the user has filled out their initial info.
i do not understand
im super confused
external_account are bank accounts correct?
Correct
ok
and i need to have ext acc info before rendering the embedded form
otherwise it will render a redirect btn
correct?
?
are you there?
I think you can turn the button off with this setting https://dashboard.stripe.com/test/settings/connect/payouts/external_accounts
I don't think bismark commented on that when I read that message
With the code from this message. I thought we were determining whether you even wanted to do that right now #1254820624279404646 message
yes, but i mentioned that i dont have any information
external_account: { account_number: '12345', country: 'US', ..``
on acc unmber or country
how can i pass information to external_account
if i dont have any ?
and this piece of code
const externalAccount = await stripe.accounts.createExternalAccount( 'acct_1032D82eZvKYlo2C', { external_account: 'btok_1NAiJy2eZvKYlo2Cnh6bIs9c', } );
is telling me to generate the information with a token
In that case, you wouldn't pass that info on account creation. You would create the account, have our embedded onboarding collect the rest of their info, collect the external account info yourself, and then use that to add an external account to your connected Account via the update account call.
Not sure what you mean by that. Are you talking about accounts.create and accounts.createExternalAccount as the two cases here? Or something else?
bro
let me try to explain again
const account = await stripe.accounts.create({ type: 'custom', country: 'BR', email: data.email, capabilities: { card_payments: { requested: true }, transfers: { requested: true } }, business_type: 'individual', });
on the stripe.accounts.create
should I
- Create an external account as well during the stripe.accounts.create, like this:
``// Create a new Stripe account for the user
const account = await stripe.accounts.create({
type: 'custom',
country: 'BR',
email: data.email,
externalAccount = await stripe.accounts.createExternalAccount(
'acct_1032D82eZvKYlo2C',
{ external_account: 'btok_1NAiJy2eZvKYlo2Cnh6bIs9c' },
capabilities: {
card_payments: { requested: true },
transfers: { requested: true }
},
business_type: 'individual',
});
externalAccount = await stripe.accounts.createExternalAccount(
'acct_1032D82eZvKYlo2C',
{
external_account: 'btok_1NAiJy2eZvKYlo2Cnh6bIs9c',
}`
passing externalAccount = await stripe.accounts.createExternalAccount( 'acct_1032D82eZvKYlo2C', inside the stripe.accounts.create object
- Or should I first create the external account
const externalAccount = await stripe.accounts.createExternalAccount( 'acct_1032D82eZvKYlo2C', outside the stripe.accounts.create object
and only then pass the recently created external acc to the stripe.accounts.create object
const account = await stripe.accounts.create({ type: 'custom', country: 'BR', email: data.email, capabilities: { card_payments: { requested: true }, transfers: { requested: true } }, external_account = ? business_type: 'individual', });
You can't do either of those if you don't have the bank account info up front
If you don't have the info up front, you have to onboard the account without it and then add the bank account later
ok, so what bank account info do i need upfront? in order to be able to create stripe external acc
The data that the external account create call takes, namely account_number, country, currency, account_holder_name, and account_holder_type
where can i see this in the docs?
Unfortunately I am not finding a doc that demonstrates this specific flow. You could pass it in the way that I demonstrated in the message with the account create call #1254820624279404646 message
Taking a step back, is there a specific reason that you want to avoid this modal? It may be easier to address that issue and enable you to use Financial Connections, which would make this process much easier
i do not wish to do the modal
i want the form to be embedded
` const account = await stripe.accounts.create({
type: 'custom',
country: 'BR',
email: data.email,
capabilities: {
card_payments: { requested: true },
transfers: { requested: true }
},
business_type: 'individual',
external_account: {
account_number: '12345',
country: 'US',
...
}
});``
here there's external_account: { account_number: '12345', country: 'US',
but here you've mentioned multiple other fields
like : namely account_number, country, currency, account_holder_name, and account_holder_type
so what should i do ?
Pass them in the same hash
That is what the ... placeholder represented.
If you try to write that call and fill out all of those fields within the same external_account hash, I think that will make it clearer
Can you tell me more about which part is confusing? I already showed where those parameters go, are you trying to understand what data goes in to each? Or something else?
Also if this is just a UI preference, I would highly reccommend reconsidering this. Allowing users to use our pre-built popup would make this a smoother experience for most users and would be easier for your to code as you wouldn't need your own bespoke workaround.
i do not wish to do the modal
i want the form to be embedded
` const account = await stripe.accounts.create({
type: 'custom',
country: 'BR',
email: data.email,
capabilities: {
card_payments: { requested: true },
transfers: { requested: true }
},
business_type: 'individual',
external_account: {
account_number: '12345',
country: 'US',
...
}
});``
here there's external_account: {
account_number: '12345',
country: 'US',
Vítor Zucher — Hoje às 19:47
but here you've mentioned multiple other fields
like : namely account_number, country, currency, account_holder_name, and account_holder_type
so what should i do ?
like
what params should i pass to this object?
They go in the same external_account parameter that the other external account fields go in to.
ok