#magnus_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/1353839884070031531
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
This is my code: const account = await stripe.accounts.retrieve(agencySnapshot.get('stripeAccount'));
if (!account.details_submitted || !account.payouts_enabled) {
stripeInvalid = true;
}
if (account.requirements?.currently_due?.length !== undefined && account.requirements.currently_due.length > 0) {
stripeInvalid = true;
}
The tasks which stand on top of the connected account overview like accepting the terms etc.
The reason why the connected account has the status "restricted"
Got it
Looking at a connected account's requirements hash is the recommended way to handle this: https://docs.stripe.com/connect/handling-api-verification#determine-if-verification-is-needed
okay so checking for payouts enabled and details submitted is useless?
and instead I should check if the past_due array is empty or not?
or should I check for the errors array?
You should look at both past_due and currently_due, as well as whether requirements.errors is empty or not and whether requirements.disabled_reason is not null
can you give me a code example when I should display the user an error message? Like my example I posted above
I recommend reading through:
https://docs.stripe.com/connect/handling-api-verification and
https://docs.stripe.com/connect/testing-verification
to test this out/see requirements in action
Then define your logic based on that
thank you!
@remote rock looks like you're in the wrong place, this thread is for someone else's question.
- If you have your own thread please chat there.
- If you have a question or a followup to a closed thread use one of the buttons in https://discord.com/channels/841573134531821608/842637025524842496 to get help (we don't reopen closed threads).
Note that posting inappropriate messages in other people's threads is against the rules. No worries if this was just an honest mistake, but anyone who violates the rules multiple times will be removed from this server.