#amanuel
1 messages · Page 1 of 1 (latest)
hello! taking a quick look, onesec
Thank you, thank you!
i would look at the details_submitted parameter like what this section mentions too : https://stripe.com/docs/connect/express-accounts#return_url
i'm not entirely certain why we mentioned looking at charges_enabled in that section without providing context on why, but i'm guessing that at the same time you may want to validate that to make sure that charges are enabled so that you can create charges on the account. Otherwise, you may want to inform the Express account user accordingly too
Yes, thank you so much
The confusion stems from
charges_enabled and sending an onboarding link again
My idea was like you said:
- After finishing onboarding check details_submitted
- If all good: then don't show onboarding link anymore
- If not: then generate onboarding link again
That's it, and if their details_submitted they can just log into dashboard and fix the payment details, no?
Ok, so second question is what pattern is good: webhooks vs retrieving Account object to check if they actually finished?
That's it, and if their details_submitted they can just log into dashboard and fix the payment details, no?
yep
Ok, so second question is what pattern is good: webhooks vs retrieving Account object to check if they actually finished?
webhooks are for async notifications. So for example, you want to update your DB asynchronously and it doesn't matter how long it takes. How you can use this for example, is if you're maintaining a DB, where you save the details_submitted parameter for that user on your site when you receive a account.updated event.
So when your user logins, you would automatically be loading a set of their details from your DB, and possibly saving some of it to the session
there's no need to repeatedly retrieve the Account object to check if they've already finished since they would only submit the details once
however, when they are redirected to the return URL - what you can do is to automatically submit a request to retrieve the Account details from your own DB, and if it doesn't yet exist, make a request to retrieve it. If the webhook notification came in first and was processed, the Account details would already exist, so you wouldn't need to retrieve the Account details again
it's somewhat of a two-pronged approach