-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Managing STRIPE_PRICE_IDs for all subscription tiers for dev and prod" #5
Comments
I have to keep thinking about this. I think you're onto something here |
Why not using lookup keys on the price? Am I missing something? |
Yes, this is what I am doing, better than having to take note of the price ID imo. |
I am not managing PRICE_IDs at all. I am syncing products(plans in my case) to stripe on boot + every 15 minutes. When plans are updated(For example, Price is updated in CMS), I'm creating a new price in stripe for that particular product. If a plan is deleted(from CMS), stripe product is just deactivated. That works for me, so far at least. |
managing price Ids as env variable obviously isn't a thing in marketplaces where users create/list their prices. has to be dynamic look up |
Thanks for making this doc. It makes me feel a little better about my own agonies.
The STRIPE_PRICE_ID env var thing has been a pain. I recently put some metadata on the products (or was it prices? probably both).
{ sync_this_product: 1 }
or{ product_type: basic|premium }
or something. Then sync products/prices from stripe to db on boot or something and as needed. And load the prices into the app from there instead of by the ID env var.Then the app doesn't have any PRICE_ID type env vars. You sync with a prod token, you get prod prices. With dev token get dev prices. hth
The text was updated successfully, but these errors were encountered: