W
Wasp4mo 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.
8 Replies
kapa.ai
kapa.ai4mo 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
miho4mo ago
OpenSaaS.sh
Guided Tour
Open SaaS is a free, open-source, full-stack SaaS starter kit for React + NodeJS.
Jorge
JorgeOP4mo ago
Ups, my fault! I updated the wrong file (.env.server instead .env.client) I guess the doc is not up-to-date for this part 🙂
No description
miho
miho4mo ago
The photo you sent mentions a different variable that should go into the .env.server? It seems to me that you are using an older Open SaaS version and these docs are for the latest version. Before Open SaaS used REACT_APP_STRIPE_CUSTOMER_PORTAL client var and now it uses STRIPE_CUSTOMER_PORTAL_URL server var.
Jorge
JorgeOP4mo ago
Oh! You are completly right: https://github.com/wasp-lang/open-saas/blob/main/template/app/.env.server.example My version is already outdated 🙂 Thanks for your help @kapa.ai how can I get my current Open SaaS version?
kapa.ai
kapa.ai4mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To check the version of your Open SaaS project, you can look at the package.json file in your project's root directory. This file contains metadata about your project, including its current version. Here's how you can find it: 1. Open your project's root directory in your code editor or file explorer. 2. Open the package.json file. 3. Look for the version field. The value of this field is the current version of your project. Please note that this will give you the version of your project, not the version of Wasp itself. To check the version of Wasp you're using, you can run the wasp version command in your terminal. ---------------------- 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?
Jorge
JorgeOP4mo ago
@kapa.ai cannot find version in app/package.json
kapa.ai
kapa.ai4mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- If you're using the Wasp framework, the version of your Wasp project is not stored in the package.json file. Instead, you can find the Wasp version in the .wasp file in your project's root directory. Here's how you can find it: 1. Open your project's root directory in your code editor or file explorer. 2. Open the .wasp file. 3. Look for the wasp field. Inside this field, you should find a version field. The value of this field is the current version of your Wasp project. Here's an example of what it might look like:
app todoApp {
wasp: {
version: "^0.13.0"
},
...
}
app todoApp {
wasp: {
version: "^0.13.0"
},
...
}
In this example, the version of the Wasp project is 0.13.0. If you want to check the version of the Wasp CLI you're using, you can run the wasp version command in your terminal source (https://github.com/wasp-lang/wasp/issues/102). ---------------------- 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?
Want results from more Discord servers?
Add your server