#matt_connect-events
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/1285285930026008738
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
@proper spire You should read https://docs.stripe.com/connect/webhooks first which explains how to listen to Events on connected accounts
matt_connect-events
We're listening to events, there just doesn't appear to be any events for "Connected account updated config"
gotcha. Can you explain what that means? Like "config" could mean 20 different things, if you can tell me exactly what you are talking about I can tell you if something exists
I think the baseline example is after a new connected account has been added to our account
I'm sorry that still doesn't say anything ๐
Can you give me a clear example of something that doesn't work You say you are listening to Events but did you read the specific doc I shared which is about Events on connected accounts? I assumed you meant you understand that but maybe you didn't realize there's different behaviour for Connect?
Let's say we have 3 connected accounts within our primary account right now, we would like an event when our primary account has 4 connected accounts.
The connected accounts webhook only sends events that originate from those connected accounts
Where does the 4th account come from though? How did it appear?
Via the link provided to create a new connected account. Here's an example link
https://connect.stripe.com/oauth/authorize?redirect_uri=https://connect.stripe.com/hosted/oauth&client_id=ca_QH8ovEnCisy6Hqv2ojQpChcQjJtUiVan&state=onbrd_QrReKy1Ca1BMMgE3aGsTayZUd0&response_type=code&scope=read_write&stripe_user[country]=US
Are you using our old OAuth integration? Are you a no-code user?
I'm sorry there are dozens of ways to integrate our products and APIs and I really need a clear 2 sentences summary of what your integration really looks like to help guide you
We connect accounts both by creating links in the dashboard like the example link above, and by creating links via the python sdk as seen in this code snippet
stripe_account = stripe.Account.create(
country="US",
email=responsible_party_email_address,
capabilities={
# https://docs.stripe.com/api/accounts/create#create_account-capabilities
"card_payments": {"requested": True},
"transfers": {"requested": True},
"link_payments": {"requested": True},
},
controller={
"fees": {
# https://docs.stripe.com/api/accounts/create#create_account-controller-fees-payer
"payer": "application"
},
"losses": {
# https://docs.stripe.com/api/accounts/create#create_account-controller-losses-payments
"payments": "application"
},
# https://docs.stripe.com/api/accounts/create#create_account-controller-requirement_collection
"requirement_collection": "stripe",
"stripe_dashboard": {
# https://docs.stripe.com/api/accounts/create#create_account-controller-stripe_dashboard-type
"type": "express"
},
},
)
account_link = stripe.AccountLink.create(
account=stripe_account.id,
refresh_url=refresh_url,
return_url=return_url,
type="account_onboarding",
)
return account_link.url
Okay so you aren't using OAuth at all. You are actively creating those accounts in this API yourself with your own code.
So you know they exist since you created them. You shouldn't need any Event for that
These links send the users into the stripe onboarding flow, but we don't currently receive any events after the user has completed that stripe onboarding flow
๐
There is no Event "they closed their tab" yes. There are Events telling you when information is provided, verified or needed. You, as the platform, listen for account.updated Events to track async updates as they happen
Your code also has a return_url that the end user would be redirected to once they are done
We've had users close their browser before hitting the return URL so we were hoping for something that was more deterministic
We haven't always seen account.updated events even in our own controlled environment testing
account.updated would only happen if they were actively changing something. If they go there and do nothing then there would be no Event.
Ultimately it shouldn't matter at all though. You have the requirements when you create the Account. You track those. And then until you get the next account.updated Event, you know this is the information needed for the account. and you can nudge them if they don't complete onboarding over time
In our testing even if the account was successfully updated there would still be no events
That should be impossible. If you give me a clear account id where this happened I can have a look
Give me just a minute and I'll recreate
I just created this new account acct_1PzizlKDIlOOoxAG, and there are no additional events about this account on either our primary webhook or the connect account webhook
Your Test Connect WebhookEndpoint is currently disabled ๐
I checked and there is an account.updated Event on that account and it happened 57 seconds after creation, likely when you went through onboarding
You can view the Dashboard of that account and look at its Events to confirm
Ah so it's just not showing up becasue we have the webhook disabled?
That makes sense then!
If you're unsure, you can always use the List Events API https://docs.stripe.com/api/events/list with the connected account id acct_123 in the Stripe-Account header https://stripe.com/docs/connect/authentication#stripe-account-header to see what Event(s) happened on that specific account
Oh that's helpful, thank you!!