#jacob-thomas_webhooks

1 messages ยท Page 1 of 1 (latest)

crimson cairnBOT
#

๐Ÿ‘‹ 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.

brave yacht
#

Hello

potent ermine
#

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.

brave yacht
#

sure, it should be okay to share here cause it's a sandbox account right?

potent ermine
#

yep, it's fine to share it here. It's not possible to do anything with just an account ID

brave yacht
#

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

potent ermine
#

which event are you looking at / for specifically?

brave yacht
#

v2.core.account.created

potent ermine
#

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_

brave yacht
#

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",
      },
    });
potent ermine
#

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?

brave yacht
#

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

potent ermine
#

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

brave yacht
#

ohhh, so i need to be using this then right?

#

i think i was using the other one

potent ermine
#

yep, that's right

brave yacht
#

oh perf, and if a user completes the onboarding, that's when the account.created is fired right?

potent ermine
#

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

brave yacht
#

ah okay, makes sense

potent ermine
#

you would want to listen for the account.updated event

brave yacht
#

and what happens if a user leaves the onboarding before finishing it? nothing right? account.updated only fires when it's completed right?

potent ermine
#

no, the account.updated event fires whenever there's a change to the Account

brave yacht
#

okay so if charges_enabled it means onboarding is complete right?

#

or details_submitted

potent ermine
#

gimme a while to type out the explaination

brave yacht
#

okay thanks haha, just confused on that part

potent ermine
#

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)

brave yacht
#

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

potent ermine
#

and charges_enabled is for is stripe needs more info - You shouldn't need to handle this though

brave yacht
#

thats just letting the user know they need to login stripe and update whatever they need right?

potent ermine
#

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.

brave yacht
#

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

potent ermine
#

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

brave yacht
#

okay sounds good, im not there yet but when i am ill keep this in mind

potent ermine
brave yacht
#

ah perf, thank you

potent ermine