#sqmer_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1397081257480945817
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ I just want to acknowledge your question. I'm working on other threads and will get to yours soon!
I'm back, sorry for the wait. Could you explain "a joint stripe account for subscriptions" ? I am assuming you want to create Connected Accounts that represents different hotel brands, and each of these Connected Account will have a subscription with your Platform account?
Hi there, I'm also an engineer from Stripe.
You can't directly change the props that you pass to StripeProvider. However, you can defer the mounting of StripeProvider until your application has determined the correct stripeAccountId for checkout.
Actually it is just a different account so imagine this:
Hotel 1 -> Stripe Account 1 -> Used for booking room
Hotel 2 -> Strpre Account 2 -> Used for booking room
Membership In App Subscription -> Stripe Account 3 -> Used to get discount by paying a yearly fee
but the same app has the booking and in app subscription membership functionality and so payments could go to different accounts but also the booking flow is one tab and then the membership sign up is another flow on another tab (so different navigation)
Hey Jack nice to meet you and thank you for your response.
Can you show me an example of what that would like ?
Also what if stripe Account Id & PublishableKey change on a different screen, would this way still work ?
For example, let's say your customer complete the payment in your Checkout component and you wrap <Checkout> in <StripeProvider>
Your code should look something like
<StripeProvider>
<Checkout>
</StripeProvider>
Assume Checkout is your last step, so you can defer render <StripeProvider>, alongside <Checkout>, until your application determines which connected account ID use.
If you use considtional rendering, the code should be sth like
{
stripeAccountId &&
<StripeProvider stripeAccountId=stripeAccountId>
<Checkout>
</StripeProvider>
}
So in this way the StripeProvider will only be rendered when stripeAccountId is set