#antonio-giano_unexpected
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/1313931850040868935
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- antonio-giano_best-practices, 2 hours ago, 13 messages
Hello! Can you provide more specific details about what you expected to generate an account.updated Event but didn't? You said it was something during onboarding, but what specifically?
Also, can you give me the evt_ ID of the account.external_account.created you mentioned above?
Yep. let me explain better. Let's say that an account has got some required information, after the creation of connect account is performed successfully. So, i calling a following API:
const accountLink = await stripe.accountLinks.create({
account: 'acct_1Mt0CORHFI4mz9Rw',
refresh_url: 'https://example.com/reauth',
return_url: 'https://example.com/return',
type: 'account_onboarding',
});
After getting into onboarding, i make some update like as first name, last name. Or to perform the upload of a document. When i click the button, i didn't receive this event: account.updated.
About the id of the event account.external_account.created: evt_1QSMzDQdDJdCxZqBhN4nZopB
The event mentioned above were raising during the updating of the banking information. And that's expected. But i was expected the same for the personal information.
I mean this.
To clarify, did you complete the entire onboarding process?
So you're working with two different account types here, one is a Custom account and the other is using controller properties where Stripe is responsible for requirement collection. In the latter case you're not going to have visibility into things like when a passport is provided and whatnot because Stripe handles that.
In a previous thread, I was advised to rely on AccountLink if further information is requested. Then, from the onboarding process, the necessary information is then entered.
How, then, can I ensure the webhook on receiving events of this type? It is necessary for me because there is data in my database that is updated based on whether or not the account has provided the necessary information.
I give a further example. Suppose a person realizes a connected account. Then the onboarding process is carried out successfully.
However, after a while, he is asked for the information necessary for the interaction with stripe to be successful. In that case, the interaction with the platform will be restricted. And it will be updated based on whether it provides the information or not.
You're doing the correct thing with Account Links and whatnot, it's just that with this type of connected account you don't have visibility into the specific details of the onboarding and info collection process. Unlike with Custom accounts, this process is handled by Stripe, not by you, so you don't get granular details about it. You would need to wait for the information to not just be provided, but verified, and then check to see if things like charges_enabled is true or not on the Account (which you will get an account.updated Event for, but not right away): https://docs.stripe.com/api/accounts/object#account_object-charges_enabled
So, will the account.updated event still be generated after the information is verified?
I have no interest in getting the detailed information. But only receiving certain events, as I have followed best practices regarding event handling regarding account verification: https://docs.stripe.com/connect/handling-api-verification
How come, then, the first time you enter the onboarding process, you immediately get the many events, including the account.updated event?
Note that several events are generated, as opposed to when submitting the necessary information.
So, will the account.updated event still be generated after the information is verified?
Yes.
How come, then, the first time you enter the onboarding process, you immediately get the many events, including the account.updated event?
I'm not sure I understand your question here. You said above you're not getting account.updated Events, but now you're saying you are? Seems like I'm misunderstanding something. Can you point me to a specific example Event?
Yep.
Let me explain further. When I first create the logged-in user by exploiting the following codes:
var { id } = await this.stripe.accounts.create({
controller: {
stripe_dashboard: { type: "express" },
fees: { payer: "application" },
losses: { payments: "application" }
},
capabilities: {
transfers: { requested: true },
},
country: account.country,
individual: {
first_name: account.firstName,
last_name: account.lastName,
},
business_type: "individual",
email: account.email,
tos_acceptance: {
service_agreement: "recipient",
}
})
const accountLink = await this.stripe.accountLinks.create({
account: accountId,
return_url: `${req.headers.origin}/login`,accountId=${accountId}`,
refresh_url: `${req.headers.origin}/login`,
type: "account_onboarding",
});
the process works properly as I receive all events related to the onboarding process such as person.created, capatibilty.updated, account.updated, etc.
Now, to what I report on which I have unexpected behavior is the following: suppose after a number of months more information is requested from stripe. Then, I have the person redirect to the onboarding process for entering the requested information. In this second process, when I make updates to the personal information I do not get the account.updated event. But if I make updates to the banking information, I get the events mentioned before.
Yep, that's normal and expected in this scenario because requirements are being collected by Stripe.
You don't get any events about that because there's nothing that impacts you, as the platform. If someone needs to provide more info and they do so before the account is restricted then no problem, everything's fine.
You would get an account.updated if that didn't happen and the account was restricted though.
Okay, just to see if I have a clear understanding about what you said.
When the information is not required right away but rather can be provided within a certain amount of time so in the currently_due field, the account.updated event is not generated right away but rather after a while.
In the case where the requested information was in the past_due field, then the platform would be notified immediately to that via the account.updated event thus allowing the limitation of a person's interaction with the platform to be lifted. Right?
๐ stepping in here
You will get an account.updated Event when things change in terms of the requirements hash of the account object but not for the submission of specific information.
So if something was to become currently_due or past_due then yes you would get that information in a Webhook
However, when they submit the relevant information like name or uploading a document, etc. you don't receive those specific details.
Got it. Can you give me a moment to verify this?
Sure