#Bob the builer-connect-stripe-js

1 messages · Page 1 of 1 (latest)

indigo vortex
solar hawk
#

Oky that's new. Thanks for the information.

indigo vortex
#

Sure, let me know if anything doesn't make sense!

solar hawk
#

req_in1EoGwbixOAr0 still the same error

#

_stripe_account is being added now

indigo vortex
#

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?

solar hawk
#

I added a second parameter as per previous guide:

const stripe = Stripe('public key', {
    stripeAccount: 'account id',
});
// stripe.elements(...
indigo vortex
#

Code looks right. And stripe is definitely the instance of Stripe.js you're using with confirmCardPayment?

solar hawk
#

Yes

indigo vortex
#

You'll need to share the full code, something is missing for sure

solar hawk
#

_stripe_account is being sent by something. Not as a header though

#

Oky, I'll do a minimal reproducable case shortly

indigo vortex
#

Hmm, the actual issue is you're using the publishable key of the connected account

#

Not the platform

solar hawk
#

Yes

indigo vortex
#

So you need to initialise Stripe.js with the publishable key of the platform, and pass the ID of the connected account

solar hawk
#

Right, makes sense.
Confusing when platform's key or connected account's key is needed

indigo vortex
#

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

solar hawk
#

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.

indigo vortex
#

Yeah, it's generally not recommend to use the connected account API keys directly!