#hermenherman_api

1 messages ยท Page 1 of 1 (latest)

visual creekBOT
median quarryBOT
#

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.

visual creekBOT
#

๐Ÿ‘‹ 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/1250616308039553085

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

tiny fable
#

Basically is there a way to change the connect account after it's already been intialized?

#

If i first call:

var stripe = Stripe('pk_test_OyVTDAAZ3DwVtmH92ugkAxao', { stripeAccount: 'some_stripe_account');
#

and then later call:

var stripe = Stripe('pk_test_OyVTDAAZ3DwVtmH92ugkAxao', { stripeAccount: 'some_other_account');

is that bad?

#

and will existing elements recognize the chaange?

red geode
#

Good question! It isn't a common scenario but I think the elements, which is generated from the stripe variable will still stick with the old account. Could you run some test? ie. try to switch account and then use the old Elements and finish a PaymentIntent?

tiny fable
#

I can give it a shot

#

but is the right way to just re-initialize Stripe?

#

i don't know if its a singleton so or not

red geode
#

That's why we conduct the test ๐Ÿ™‚ I would be skeptical for assuming it will just work. Theoretically we expect each website is initialized once for a fixed merchant setup

tiny fable
#

but if you're using a Stripe Connect, we don't know who you're goign to try to pay until you do it

#

and you could absolutely pay 1 person, then pay a 2nd bill

red geode
#

You may want to delay the page which initialize stripe with the account header, to until you determine which account the customer is going to pay

tiny fable
#

but what if they want to pay a second bill with a different Connect account?

#

it seems to be working at least for calling confirmPayment