#akii

1 messages · Page 1 of 1 (latest)

sonic oliveBOT
tardy grail
#

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

dusk lantern
#

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

tardy grail
#

So yes, set the apiKey from server's environment variable

dusk lantern
#

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?

tardy grail
dusk lantern
#

Okay, I will check this out, meanwhile, could u try not to close this thread for an hour or so ??

tardy grail
#

Sure. But even if it is closed you can request to unlock in the channel

dusk lantern
#

Okay thanks

dusk lantern
#

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?

barren bay
#

Hi @dusk lantern I'm taking over

#

yes RequestOptions is available for most of the API calls.

dusk lantern
#

Okay, Is there any doc I can refer to for RequestOptions specifically?

barren bay
#

You should be able to find it in the API reference of the library that you are using.

dusk lantern
barren bay
#

I don't have the list but you can check the Stripe SDK code directly, they are open-sourced

dusk lantern
#

okay