#teklets-api-key
1 messages · Page 1 of 1 (latest)
I'm not sure I understand what you're asking. Either the secret or public API keys are sent on all requests
yeah lemme see if i can clarify this:
stripe.api_version = "2020-08-27"
stripe.api_key = stripe_prod_apikey
is how you'd normally do it, i want to specify this on a request basis
right now when our connected accounts, play around with different environments, we want to keep track of wether they're in test or prod mode and then adjust requests based on that. we currently do this by having a domain level env var w/ the apikeys for each mode but i wanted to see if we can centralize this.
i suppose i could just write a wrapper around the api itself but was wondering if there was an easier way through the sdk
A wrapper would probably be the best/cleanest route. Otherwise I think you could just import stripe on a per-function basis and pass it whatever you want in order to initialize with, but that's way messier