#vell_2x
1 messages · Page 1 of 1 (latest)
Hi 👋
What's the issue you are experiencing?
Can you be more decriptive?
app.get('/onboard', async (req, res) => {
console.log("Req: " + req.body);
console.log("Account ID: " + req.body.account);
const accountID = req.body.account;
const accountLink = await stripe.accountLinks.create({
account: accountID,
refresh_url: 'My link', // URL to redirect the user to after completing the onboarding
return_url: 'my link', // URL to redirect the user to after they successfully complete the onboarding
type: 'account_onboarding', // Type of link, you can use 'account_onboarding' for onboarding a user
});
console.log('Account Link:', accountLink.url);
// Return a response
res.redirect(accountLink.url);
});
I am calling this hook to send users account id to this hook and have them redirected to your onboad process