#zain-connect-accountlinks

1 messages ยท Page 1 of 1 (latest)

fringe ruinBOT
grizzled jacinth
#

HI ๐Ÿ‘‹

Are you creating onboarding sessions or are you an account attempting to onboard?

hallow void
#

Here is the methods i'm using.
const account = await stripe.accounts.create({
type: 'standard',
country: 'GB', // 'GB' for the United Kingdom
email: result.email, // User's email
});

            const refreshUrl = `http://localhost:3000/user/reauth?userId=${encodeURIComponent(
              result.id
            )}`;
            const returnUrl = `http://localhost:3000/user/stripe-setup-complete?userId=${encodeURIComponent(
              result.id
            )}`;

            console.log('refreshUrl', refreshUrl);
            console.log('returnUrl', returnUrl);
            const accountLink = await stripe.accountLinks.create({
              account: account.id,
              refresh_url: refreshUrl,
              return_url: returnUrl,
              type: 'account_onboarding',
            });

I'm returning accountLink.url in response to redirect user to onboarding page.

#

I'm sorry I don't know about the onboarding sessions or an account attempting to onboard

grizzled jacinth
#

Okay so do you get an Account Link object back?

hallow void
#

yes from which I'm returing the url back in response for onboarding

grizzled jacinth
#

Okay and if you just print out the url in your terminal and click on it, you get sent to an onboarding form?

hallow void
grizzled jacinth
#

Okay so that part is working fine. What is the error you are encountering?

fringe ruinBOT
#

zain-connect-accountlinks

hallow void
#

I only want to know the test values for onboarding. here is the page where i redircted to.
when I clink on the login button, it takes me to phone verification page and when i enter the test phone number which is 1212345678 for GB. It redirect me to page where i enter the test code which is 000-000. The error i get is invalid code.

grizzled jacinth
#

You need to use the test phone number, otherwise the session is not configured to use test mode values

#

000-000-0000

hallow void
#

ok, let me try.

#

error: "+440000000000" is not a valid phone number

grizzled jacinth
hallow void
#

are you a bot?

fringe ruinBOT