#akii
1 messages · Page 1 of 1 (latest)
You can setup 2 environment variable, each saves a key. Then you can programatically switching them.
By the way in 1 Stripe account you also has Live mode and Test mode with separated key. It's more recommended than 2 accounts
Okay, but I am talking about the backend here. So I need to set the stripe key Stripe.apiKey before the java class is loaded
So yes, set the apiKey from server's environment variable
I don't get it. Once I set one key. it will keep using that key right?
How do make some calls go to test mode and some to live mode?
You could setup 2 Stripe instance probably? Or you can specify the key per request: https://stripe.com/docs/videos/developer-foundations?video=authentication&lang=ruby
Okay, I will check this out, meanwhile, could u try not to close this thread for an hour or so ??
Sure. But even if it is closed you can request to unlock in the channel
Okay thanks
It looks like using RequestOptions i can set different stripe keys as i make the calls
This will work i guess.
I was wondering if this RequestOptions object can be used with every type of api call we make?
Hi @dusk lantern I'm taking over
yes RequestOptions is available for most of the API calls.
Okay, Is there any doc I can refer to for RequestOptions specifically?
You should be able to find it in the API reference of the library that you are using.
https://stripe.dev/stripe-java/com/stripe/net/RequestOptions.html for example, this is the javadoc
declaration: package: com.stripe.net, class: RequestOptions
Is there a list of what all api calls it support?
I don't have the list but you can check the Stripe SDK code directly, they are open-sourced
okay