I’m trying to use Netlify functions for a post checkout stripe hook. However, I can only test if I set my environment variables in the web console to the test keys from stripe. Unfortunately, there’s no way to separate development environment variables from production environment variables. If I want to test changes to my cart in development I essentially have to disable checkout on my site while I do so.
hello! no you are not missing anything. this is a top request for us. you can follow
and
and
to track this. for now you’ll have to use a conditional like process.env.NODE_ENV != 'production' ? 'DEV_ENV_VAR' : 'PROD_ENV_VAR' or something similar for your env vars (i know its not great but its not a deal breaker either). thanks for your patience while we sort this out.