#jacob-thomas_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1463731354914263113
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
hello! can you share the connected account id? I'll take a look
Generally, account creation involves many steps and processes behind the scenes, and webhook processing is asynchronous by design, so some delay is expected.
sure, it should be okay to share here cause it's a sandbox account right?
yep, it's fine to share it here. It's not possible to do anything with just an account ID
acct_1SsE173opM4Vup56
perf
is it normal for it to take over 10 minutes? if so that's okay but i just wanna make sure yk haha
which event are you looking at / for specifically?
v2.core.account.created
can you share the request id and the code you used to create this connected account? It looks like you are creating this as a v1 account which is a bit confusing to us.
a request id has the prefix req_
sure haha, here is the code im using:
const account = await stripe.accounts.create({
type: "express",
country: "US",
email: email,
capabilities: {
transfers: { requested: true },
},
business_profile: {
product_description: "[generic message]",
},
});
const link = await stripe.accountLinks.create({
account: account.id,
refresh_url: `${getDomain()}/host`,
return_url: `${getDomain()}/host`,
type: "account_onboarding",
collection_options: {
fields: "currently_due",
},
});
Thanks for sharing! So this is v1 API ๐ , can you share why you are looking at the v2 Events for account creation? Are you following any specific documentation from Stripe that pointed you to use v2 Events for account creation?
req_BXygnUouxXPhn3
oh, when i was looking at the list of events in the event log in the workbench, they were all v2 events i think
so i just figured i should be looking at v2 events
aaaaah, i see, folks would use v1 Events for v1 Accounts, so we were wondering how did you arrive at this implementation
so for v1 Account events, you need to listen to the events on the connected accounts
you can't view the Events from the connected account via workbench from what i recall
it's a bit unexpected to see v2 Account Events for a v1 Account, but that's a question that we'll look into separately
yep, that's right
https://docs.stripe.com/connect/webhooks - this might be helpful too
oh perf, and if a user completes the onboarding, that's when the account.created is fired right?
for v1, there's no account.created event
logically, you're creating the account via /v1/accounts API, before you create the Account Link
so if the request to /v1/accounts API succeeds, the account is already created
ah okay, makes sense
you would want to listen for the account.updated event
and what happens if a user leaves the onboarding before finishing it? nothing right? account.updated only fires when it's completed right?
I think this section is what you are looking for : https://docs.stripe.com/connect/express-accounts#return-user
no, the account.updated event fires whenever there's a change to the Account
okay so if charges_enabled it means onboarding is complete right?
or details_submitted
gimme a while to type out the explaination
okay thanks haha, just confused on that part
For Express accounts, I would check for details_submitted to determine is onboarding is completed
To give some context, it's possible for details_submitted to be true, but charges_enabled to be false. Sometimes, it's because Stripe requires additional verification details or for for other reasons after the user has completed the onboarding form in the Account Link. If the user has already completing onboarding, and more information is required for an Express account, the Express account would login to their Dashboard to provide those details (not via an Account Link)
ah okay makes sense
so basically check both haha
but details_submitted is for onboarding
and charges_enabled is for is stripe needs more info
and charges_enabled is for is stripe needs more info - You shouldn't need to handle this though
thats just letting the user know they need to login stripe and update whatever they need right?
hmmm, maybe? The Express account should also be aware or notified by Stripe if their account has payments disabled by Stripe. In short, for Express accounts, requirements collection is handled by Stripe. So you don't necessarily need to inform the connected account user of anything.
does stripe handle all the communication then?
including letting users know they are missing some details
and the connected account webhook is working as expected, finally haha
thank you for explaining Alex
Yes, afaik, Stripe will handle communication if additional details are required. I think it's still worth storing, or being able to retrieve those information in your system though. It's very possible that connected account users might reach out to you first because they are not aware of how Stripe works about why charges or payouts are not enabled on their account. You can see what information is required and be prepared to answer these users, and/or otherwise redirect connected account users to Stripe instead
okay sounds good, im not there yet but when i am ill keep this in mind
https://docs.stripe.com/connect/testing - for Connect testing
ah perf, thank you
https://docs.stripe.com/api/accounts/create#create_account-controller - heads up you might want to use controller instead. type is an older version of creating Connect accounts.