#Bob the builer-connect-stripe-js
1 messages · Page 1 of 1 (latest)
Hello! Yes, you'll need to pass the stripeAccount parameter when initialising Stripe.js: https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application
Oky that's new. Thanks for the information.
Sure, let me know if anything doesn't make sense!
Taking a look
Hmm, the request doesn't seem to have the Stripe-Account header. Can you share your code where you're passing the parameter?
I added a second parameter as per previous guide:
const stripe = Stripe('public key', {
stripeAccount: 'account id',
});
// stripe.elements(...
Code looks right. And stripe is definitely the instance of Stripe.js you're using with confirmCardPayment?
Yes
You'll need to share the full code, something is missing for sure
_stripe_account is being sent by something. Not as a header though
Oky, I'll do a minimal reproducable case shortly
Hmm, the actual issue is you're using the publishable key of the connected account
Not the platform
Yes
So you need to initialise Stripe.js with the publishable key of the platform, and pass the ID of the connected account
Right, makes sense.
Confusing when platform's key or connected account's key is needed
Well it depends on your Connect integration. Seemingly you're working with standard connect (and direct charges) so you'll always be using the keys of the platform account and passing the stripeAccount header with the ID of the connected account you're working with
Using platform's key all fine now 👌
~Year ago using connected account's key was needed for some of our use cases and those still work.
Yeah, it's generally not recommend to use the connected account API keys directly!