#loader_accountlink-redirect

1 messages ยท Page 1 of 1 (latest)

peak lavaBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

scenic star
#

hey @safe tendon

safe tendon
#

loader_accountlink-redirect

#

@scenic star it's impossible to wait for verification to be fully finished as some of it is done async.

scenic star
#

i think thats ok with us

safe tendon
#

You'll have to either handle this async and email your user if they need to come back, or you can have a "loading state" while you wait for the account.updated Event to come in with more details

scenic star
#

whats happening is the return_url gets invoked but the corresponding webhook then comes back with charges_enabled as false.

#

we do have a listener for account.updated hook.

#

does it have info about what more information is needed?

#

will changing collect to currently_due make any difference?

safe tendon
#

Yes! account.updated is specifically to give you detailed information about the Account itself. What you want to do is look at requirements which contains information about what's the problem

scenic star
#

ok let me check real quick

safe tendon
#

No changing that won't change anything. The problem is likely that during onboarding we collect information that looks correct but afterwards as we verify it asynchronously it comes back as invalid and we need more details

scenic star
#

got it. here is the requirements object.

#

so as per your suggestion, we should listen to this.

safe tendon
#

okay so it's telling you that one of the Person associated with the account needs to provide their SSN or an id document. So you can "parse" requirements and then show that kind of information to your user and send them back to onboarding

scenic star
#

excellent this is really helpful. Just to go in a little bit more detail, which of this fields should we focus on

#

requirements.currently_due?

safe tendon
#

currently_due is what we need now
past_due is what we needed in the past, it hasn't been provided yet so it led to some features being disabled (such as Payouts or Charges).
eventually_due is what we don't need yet, but might in the future

scenic star
#

talking specifically about onboarding, we should focus on currently_due. so unless that array is empty, the charges_enabled will not be true

#

by we i mean our company ๐Ÿ™‚

safe tendon
#

yes

#

and past_due

scenic star
#

ok so charges enabled = true always implies currently_due.length = 0 and past_due.length = 0

safe tendon
#

not at all because there's a lot more to it than this. It's possible for charges_enabled: true and still have requirements, for example to be able to receive Payouts to your bank account

scenic star
#

ok. so bottom line is always check the last webhook and see what the status of charges_enabled was. if it was false go and look at the requirements array to give better feedback to users.

safe tendon
#

yes! and keep listening for it because even over time it can change the status for various reasons and you need to be resilient to the account becoming charges_enabled: false for example

scenic star
#

makes sense. Ok we will keep it in mind. Really appreciate your help here. You just saved me 2-3 hours. thanks a lot

safe tendon
#

Sure thing!