#aidan-sunbury_api

1 messages ¡ Page 1 of 1 (latest)

grizzled roostBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257791889860591740

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

unkempt lion
#

Another issue may be that I have no way to specify the stripe account in the frontend when creating the nonce, only the card ID.

knotty mural
#

Are you using Stripe Connect by any chance?

#

Ah that may be it

unkempt lion
#

give me one sec I will send my code snippets

knotty mural
unkempt lion
#

Can I pass that header to my loadstripe function call?

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

const stripePromise = useQuery({
    queryKey: ["stripe-js"],
    queryFn: async () => {
      const stripe = await loadStripe(env.VITE_STRIPE_PUBLISHABLE_KEY);
      return stripe;
    },
  });
knotty mural
#

Yup, the doc I shared above has a React example too

unkempt lion
#

I will try that rn and get back to you in a minute

knotty mural
#

The reason you're getting this error is most likely because the Ephemeral Key is getting generated on the platform but your server-side code is trying to access it on the connected account

unkempt lion
#

That worked! tysm