#gabrieln_code

1 messages ¡ Page 1 of 1 (latest)

obtuse slateBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1338553621935034462

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

tall urchin
#

Forgot to add that I also don't get the "The account has exited onboarding" log

vestal light
#

Hmmm... that sounds like something is wrong with your React implementation.

tall urchin
#

@vestal light sorry, I actually missed an error, I'm getting:

Uncaught TypeError: connectInstance.create is not a function

That should explain why it's not loading

vestal light
#

Okay that is a very different error

#

How are you initializing Stripe Connect?

tall urchin
#

You mean

import { loadStripe } from '@stripe/stripe-js';

const stripeConnectPromise = loadStripe(process.env.REACT_APP_STRIPE_KEY);

?

vestal light
#

Except that StripeJS is different from Stripe Connect

#

They are separate resources

tall urchin
#

@vestal light oh I see, could you point me to the correct one?

vestal light
#

You have to load a separate JS file, which we dsecribe here

#
import {loadConnectAndInitialize} from '@stripe/connect-js';
tall urchin
#

got it, does it use the same key as stripejs?

vestal light
#

The same publishable key, yes

tall urchin
#

@vestal light thanks a lot, made some progress!
The component is loading now but I'm getting

utils.ts:39 Uncaught (in promise) FetchError: HTTP status code: 400. Reason: No account session with that client secret was found. Was the account session created using a secret key for a different account?

Is there a problem with the publishable key perhaps or is it something else?

vestal light
#

Are you using the publishable key for the same Stripe Account as the secret on your back-end?

tall urchin
#

@vestal light I think so.
I'm guessing this is related to not passing the correct account for accountSessions.create

      account: "acct_(...)",
      components: {
        payments: {
          enabled: true,
          features: {
            refund_management: true,
            dispute_management: true,
            capture_payments: true,
          }
        },
      }
    });

Which account should I send here? Where do I get it from?

vestal light