#david_setupintent-connect

1 messages ¡ Page 1 of 1 (latest)

feral ibexBOT
static fulcrumBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

feral ibexBOT
#

👋 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/1248303783629291550

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

trim hinge
#

david_setupintent-connect

#

@arctic drum you said you are creating the SetupIntent on the connected account and I see you pass the stripe_account option server-side in your code to do that.

arctic drum
#

Thank you for your assistance. I identified that the issue lay in the initialization of Stripe.js on the client side. Initially, I was initializing Stripe.js without passing the connected account ID, which caused an error when attempting to add a payment method to the customer in the connected account.

Originally, the code looked like this:

javascript
Copy code
const stripe = Stripe("pk_test_51Lq39MBZR5OhU67takJreymGrz56AcKaHvgyT7E2qd5ud4AU2icbseISyhZZGO9N8kV2TyNvhTH2waS2HCZo13Zy000zDuz7Y5");
The solution was to initialize Stripe.js including the connected account ID, like so:

javascript
Copy code
const stripe = Stripe("pk_test_51Lq39MBZR5OhU67takJreymGrz56AcKaHvgyT7E2qd5ud4AU2icbseISyhZZGO9N8kV2TyNvhTH2waS2HCZo13Zy000zDuz7Y5", {
stripeAccount: "acct_1PO3GiBBfF6xtJaU"
});
With this modification, I am now able to successfully create the SetupIntent and add the payment method to the customer in the connected account without any issues.

Once again, thank you for your guidance.

Best regards,
David