#aidan-sunbury_api
1 messages ¡ Page 1 of 1 (latest)
đ 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.
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.
give me one sec I will send my code snippets
Here's how you can set stripe-account header client-side
https://docs.stripe.com/connect/authentication#adding-the-connected-account-id-to-a-client-side-application
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;
},
});
Yup, the doc I shared above has a React example too
I will try that rn and get back to you in a minute
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
That worked! tysm