I have built a small site that uses the Stripe API. I managed to get it working in development environment but as soon as I try to push it to production I get the following error in my console: “IntegrationError: Invalid API Key provided”. So here is what I have done:
I am using environment variables as per Gatsby’s documentation: https://www.gatsbyjs.org/docs/environment-variables/
As mentioned it works fine in development environment.
In production I have added the live keys to Deploys > Build & Deploy > Environment
Is this the correct way to do it?