W
Wasp-lang20h ago
Jorge

Access to Manage Subscription

I’m getting an error when I try to click on the ‘Manage Subscription’ link (in Account Information). Apparently, the variable REACT_APP_STRIPE_CUSTOMER_PORTAL is missing in my .env.server. I cannot find related information in the current documentation. Thanks for your help.
2 Replies
kapa.ai
kapa.ai20h ago
Hi @Jorge. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It seems like you're trying to set up a Stripe Customer Portal and you're encountering an issue with the REACT_APP_STRIPE_CUSTOMER_PORTAL environment variable. In Wasp, environment variables are used to configure projects based on the context in which they run. For client-side environment variables, they must be prefixed with REACT_APP_ to be picked up by Wasp. These variables are embedded into the client code during the build and shipping process, making them public and readable by anyone. Therefore, you should never store secrets in them (such as secret API keys) source (https://wasp-lang.dev/docs/project/env-vars). To set the REACT_APP_STRIPE_CUSTOMER_PORTAL variable, you should add it to your .env.client file, not .env.server. The .env.client file is used for client-side environment variables. The .env.server file is used for server-side environment variables, which can store secret values since they are not publicly readable source (https://wasp-lang.dev/docs/project/env-vars). Here's an example of how you can set the REACT_APP_STRIPE_CUSTOMER_PORTAL variable in your .env.client file:
REACT_APP_STRIPE_CUSTOMER_PORTAL=your-stripe-customer-portal-url
REACT_APP_STRIPE_CUSTOMER_PORTAL=your-stripe-customer-portal-url
Replace your-stripe-customer-portal-url with the actual URL of your Stripe Customer Portal. Please note that the .env.client file should be gitignored to prevent it from being committed to your repository. This is important to prevent sensitive information from being exposed. If you're still having trouble, please provide more details about the error you're encountering so we can assist you further. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Jorge, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho14h ago
OpenSaaS.sh
Guided Tour
Open SaaS is a free, open-source, full-stack SaaS starter kit for React + NodeJS.
Want results from more Discord servers?
Add your server