STRIPE PLAN ID is sent to checkout request as Price
guys i created 3 products in Stripe test , and set my 3 env variables :
PAYMENTS_HOBBY_SUBSCRIPTION_PLANID=prod....,
PAYMENTS_PRO_SUBSCRIPTION_PLANID=prod...,
PAYMENTS_CREDITS_10_PLANID=prod...
when i tried to subscribe in my app :
the request payload in the line_items object the price was set to the plan id .
am i doing something wrong ?
4 Replies
Hi @Dada. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
It looks like you're encountering an issue with your Stripe integration in Wasp's OpenSaaS template. The problem is that you're using product IDs (prod...) in your environment variables, but Stripe checkout requires price IDs (price...) instead.
Based on the knowledge sources, the environment variables should be using price IDs, not product IDs. In Stripe, a product can have multiple prices associated with it, and when creating a checkout session, you need to specify which price you want to use.
For example, in the OpenSaaS template, the environment variables should look like:
As seen in one of the support threads, the checkout session creation uses these price IDs directly:
To fix your issue:
1. Go to your Stripe dashboard
2. Find the prices associated with your products
3. Use the price IDs (starting with "price_") in your environment variables instead of product IDs
This should resolve the issue with your checkout requests.
Stripe Testing Guide might also be helpful for setting up and debugging your Stripe integration.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Dada, 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?
@Dada hello, did you perhaps fix your issue?
@franjo Thank you bro, i switched to lemonsquizy and it works fine.
Great, glad to see it's working