#climatebro_code
1 messages · Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- climatebro_code, 19 hours ago, 7 messages
- climatebro_code, 5 days ago, 30 messages
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1237900743206371438
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi 👋
Are you trying to update the Pricen amount for an existing Price record?
Hi! No iId like the price amount to stay the same
the change i'm looking for is to change the price of a subscription from metered to fixed
You cannot change that. The only properties you can update on an existing Price are documented here: https://docs.stripe.com/api/prices/update
sure. can i not assign a new price, within a product?
Yes you can create another price associated with the same product
and can i then move customers over to that product, depending on the price they are paying for their metered subscription?
We provide an example of this (not with metered prices but the basic idea) here: https://docs.stripe.com/products-prices/pricing-models#model-good-better-best-on-stripe
and can i then move customers over to that product, depending on the price they are paying for their metered subscription?
Sorry to you mean Price? Each price record must be created asscoiated with a specific product. You cannot change the product without changing the price
yes sorry i mean price
ok – i am pretty comfortable making different pricing options. The problem i've got is that I have 2000 people paying a variety of prices (in this case, donations) that I need to switch to a fixed price.
Okay well you can create a fixed price and switch your customers to that. We cover how to upgrade/downgrade subscriptions here: https://docs.stripe.com/billing/subscriptions/upgrade-downgrade
Subscription items are merged though, so you need to specify the item id you want to replace. We show two different strategies for doing that in the doc I linked
ok - i'll have a look through
subscriptions are unique for each customer's individual subscriptions, right?
i'm not sure how i would use this to make bulk changes
Oh no you cannot perform a bulk change. I would recommend writing code to iterate through your active Subscriptions and perform the update based on whatever logic you are using.
So List Subscriptions by status: https://docs.stripe.com/api/subscriptions/list#list_subscriptions-status
Then check the items[].price to see if it matches your donation price. If it does, update that Subscription item with the new price
so i guess i could do this for all £5 a month donations, and then £7, and £10.. etc? would probably get the bulk of the work done
It depends on how you are creating Price records
manually i could probably stomach. if there was a way to do it faster i'd be all ears
I would write code. If you created your donation Prices with some identifier such as a description or metadata, I would first get a list of Price IDs to check for each Subscription.
ok. well if i could get one price to work would be a good start. I'm getting errors in python and I can't see why. I am pretty new to code and relying on chatgpt. Could i send you what i've got to see if there are obvious errors?
I would never trust ChatGPT and I"m not going to debug ChatGPT written code, especially if it's about our APIs ( it tends to hallucinate parameters and APIs that don't exist).
I would get started by copying the code snippets in our API reference docs for listing Prices and Subscriptions and try printing out the responses to see what sorts of data you have.
List prices: https://docs.stripe.com/api/prices/list
List Subscriptions: https://docs.stripe.com/api/subscriptions/list