#Equilibrium
1 messages · Page 1 of 1 (latest)
You can listen to the webhook event account.updatedfor monitoring the acocunt onboarding.
what account type are you using ? Express/Standard or Custom ?
express
You can follow this section in order to handle incomplete account onboarding:
https://stripe.com/docs/connect/express-accounts#handle-users-not-completed-onboarding
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
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.
payouts_enabled is marked as enabled if the connected account added their bank account, right?
yes and are ready for creating payouts
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
It's not recommended to text/email your customer an AccountLink:
https://stripe.com/docs/connect/express-accounts#create-link:~:text=Don’t email%2C text%2C or otherwise send account link URLs directly to your user. Instead%2C redirect the authenticated user to the account link URL from within your platform’s application.