#ray_docs

1 messages · Page 1 of 1 (latest)

twin spruceBOT
#

👋 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.

viscid prism
#

Hello 👋

What type of integration are you building? Web? Mobile?

#

Are these tw different accounts Connected Accounts or stand-alone Stripe Accounts?

cosmic plover
#

Mobile,Android

#

Independent account

#

We develop based on Kotlin

viscid prism
#

Okay, so how would you determine which account to create the Payment Intents with on the server-side?

cosmic plover
#

We have different countries, and different countries use different APIs to create intents

viscid prism
#

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?

#

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

cosmic plover
#

According to the key given by Stripe,

viscid prism
#

Sorry but that doesn't make sense

cosmic plover
viscid prism
#

What are you trying to do?

cosmic plover
#

I want to dynamically switch this key on the project

#

This goal can be achieved through a certain operation in the APP

viscid prism
#

Okay so in our guide we recommend your SERVER send this value to your Android application

twin spruceBOT
#

🗣️ 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

cosmic plover
#

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?

viscid prism
#

You can defer the PaymentConfirguration initialization

cosmic plover
#

In other words, PaymentConfiguration.init can be called in other than Application?

#

You can use Stripe anywhere before paying

viscid prism
#

Did you look at the snippets in the doc I shared?

twin spruceBOT
cosmic plover
#

I see, the code snippet is written in the Activity, I understand, thank you very much