#ray_docs
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/1389902093187289148
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- ray_docs, 1 hour ago, 22 messages
Hello 👋
What type of integration are you building? Web? Mobile?
Are these tw different accounts Connected Accounts or stand-alone Stripe Accounts?
Okay, so how would you determine which account to create the Payment Intents with on the server-side?
We have different countries, and different countries use different APIs to create intents
The Stripe Account is set in the Android SDK by the Publishable Key which you specify in the PaymentConfiguration
Sorry but that is not what I am asking
How do you know which account to use in the App?
Looking at the doc section here: https://docs.stripe.com/payments/accept-a-payment?platform=android#android-collect-payment-details
You make an API request that returns the Payment Intent details along with the Publishable Key. This Publishable Key is what determines which account the Android SDK will use
So it is up to your server-side code to determine which account is correct and return that Publisable Key
According to the key given by Stripe,
Sorry but that doesn't make sense
What are you trying to do?
I want to dynamically switch this key on the project
This goal can be achieved through a certain operation in the APP
Okay so in our guide we recommend your SERVER send this value to your Android application
🗣️ Sorry, English only
We can only provide help in English on Discord, but you can contact Stripe support for help in other languages. 🌐 Translate this message
Do I need to restart the app to dynamically change this key? Because the init is currently completed in the Application, if I switch this key but don't want to restart the app, can I call this code repeatedly?
You can defer the PaymentConfirguration initialization
That is what we show in our canonical guide here: https://docs.stripe.com/payments/accept-a-payment?platform=android#android-collect-payment-details
In other words, PaymentConfiguration.init can be called in other than Application?
You can use Stripe anywhere before paying
Did you look at the snippets in the doc I shared?
I see, the code snippet is written in the Activity, I understand, thank you very much