#pesistentcoder

1 messages · Page 1 of 1 (latest)

solemn thunderBOT
leaden summit
#

i don't see any field on account object.

dawn wigeon
leaden summit
#

Ok. Im showing stripe account status of the user in our platform. I just want to make sure, things are in sync

#

especially the status. I have seen that details_submitted has become true but sometimes, payouts_enabled is not true yet. How do we handle those cases

dawn wigeon
#

Do you have an example where you saw that? What you should do there depends on the other details on the account object at the time.

You will need to build logic to determine the "status". Important fields to look at when doing that are:
charges_enabled
payouts_enabled
requirements (particularly current_deadline, currently_due, disabled_reason, errors, past_due, and pending_verification)

leaden summit
#

I think it happens when user clicks confirm even though it says pedning information on the last screen

dawn wigeon
#

I'm guessing you're talking about the Stripe hosted onboarding process there?

leaden summit
#

right.

dawn wigeon
#

Yup, so then you need to look at the state of the Account object to see what's next. requirements.disabled_reason should give you a good idea of what that is. If the account isn't active because there are pending verifications that need to be completed, then you wait for an account.updated Event to be sent to your webhook endpoint to let you know the account has been updated and you need to check it's status again.

If disabled_reason is requirements.past_due, then you know there are outstanding requirements and can look at requirements.past_due to see what needs to be collected.

leaden summit
#

Got that, thanks. I will explain in detail what iam trying to achieve. I have payment screen which shows Connect STripe button if user doesnt have a connected account or account details if he has one. When he clicks that button, on the server i created the account, save it to my db, generate the account url and redirect the browser to the stripe on boarding flow. I have set the stripe return_url to the same page. I have set the webhook to process account.updated to update my db.

#

The issue i see here is , when it redirects back to the payment screen it may show the stripe account details which are old, probably because the webhook was not called yet

#

I think that retur_url redirection doesnt wait for webhook triggers, right?

dawn wigeon
#

Correct, the redirection to the return_url does not wait for webhooks.

leaden summit
#

I think the betetr option i feel is ot show status at all on my platform but give a link which uses oauth to integrate to the stripe dashboard?

#

what do people usually do for marketplace platforms?

#

not show*

dawn wigeon
#

Displaying a status on your end is fine, especially as you know what the exact requirements of your flows are so you can adjust the criteria for an account to be shown as active or complete to align with the requirements for your flows.

What type of Connected Accounts are you creating for your users? I'm asking because not all types will have access to the Stripe dashboard, only Standard Connected Accounts can access the full dashboard.

leaden summit
#

express

dawn wigeon
leaden summit
#

Ok, im checking details_submitted and payouts_enabled field. If they are false, iam showing a litle button, "complete" to retrigger the on board flow

#

the problem with this is, just after onboarding flow is completed and redirected back to the same page

#

it still shows that "complete" button as webhook has not updated the fields yet

dawn wigeon
#

Events sent to your webhook endpoints are to push object changes to your environment, if you need to get those changes faster you can make a request to the API to pull the current state of the Account.

leaden summit
#

ok

#

Thanks for all the help Toby

#

i will redesign to get around this issue

#

I think a simple account widget from stripe which we can show in an iframe would save lot of time

dawn wigeon
leaden summit
#

Just want to show current stripe status with capability flags like, payouts_enabled, details_submitted etc just to give the account status right after on boarding flow finishes and redirected back to our platform

#

I cound show standard success page after the return_url redirection, but account status snapshot will be much helpful?

dawn wigeon
#

Thanks for that context, I'll get it to our teams.

leaden summit
#

Btw, im following this tutorial

#

In this episode, you'll learn how to build the subscription flow for your platform customers.

The platform we're building in this series allows creators to produce creative content (e.g., a newsletter), publish their content, and monetize their content with paid subscriptions.

This is episode 15 in the series. Stay tuned and subscribe for upda...

â–¶ Play video
solemn thunderBOT
leaden summit
#

He did something similar check for details_submitted field and show the fnish on boarding button

#

In this episode, you'll learn how to build an onboarding flow to onboard authors to your creator platform.

The platform we're building in this series allows creators to produce creative content (e.g., a newsletter), publish their content, and monetize their content with paid subscriptions.

This is episode 13 in the series. Stay tuned and subsc...

â–¶ Play video
#

Although its on rails, i couldn't find something comprehensive like this one in nodejs