#Equilibrium

1 messages · Page 1 of 1 (latest)

halcyon galleonBOT
ruby saffron
#

You can listen to the webhook event account.updatedfor monitoring the acocunt onboarding.

#

what account type are you using ? Express/Standard or Custom ?

versed carbon
#

express

ruby saffron
versed carbon
#

noted, so i have to check the charges_enabled param if its enabled.. we just disable the onboarding otherwise, we onboard/continue onboarding with a new account link

#

I was checking through ChatGPT and i got the example below:

const stripe = require('stripe')('YOUR_STRIPE_SECRET_KEY');

async function checkConnectAccountOnboarding(connectAccountId) {
  try {
    const account = await stripe.accounts.retrieve(connectAccountId);
    const chargesEnabled = account.charges_enabled;
    const payoutsEnabled = account.payouts_enabled;

    if (chargesEnabled && payoutsEnabled) {
      console.log('Connect account is fully onboarded.');
    } else {
      console.log('Connect account is not fully onboarded.');
    }
  } catch (error) {
    console.log('Error:', error.message);
  }
}

// Replace 'CONNECT_ACCOUNT_ID' with the actual Connect account ID
checkConnectAccountOnboarding('CONNECT_ACCOUNT_ID');

I was wanted to confirm that charges_enabled is enough to check or i need any additional param for example payouts_enabled

ruby saffron
#

It depends on your exact use case and from what step you consider that the onboarding is considered completed... if you will be creating payouts, you can also check on that too.

versed carbon
#

payouts_enabled is marked as enabled if the connected account added their bank account, right?

ruby saffron
#

yes and are ready for creating payouts

versed carbon
#

got you, thank you

one last thing, do you think its fine to send the onboarding links via email? ( aka we are not onboarding the authenticated users via our dashboard )

we just create an account and send the onboarding link via email