#climatebro_code

1 messages · Page 1 of 1 (latest)

regal cargoBOT
vast waveBOT
#

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.

regal cargoBOT
#

👋 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.

spare cypress
#

Hi 👋

Are you trying to update the Pricen amount for an existing Price record?

honest basin
#

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

spare cypress
honest basin
#

sure. can i not assign a new price, within a product?

spare cypress
#

Yes you can create another price associated with the same product

honest basin
#

and can i then move customers over to that product, depending on the price they are paying for their metered subscription?

spare cypress
#

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

honest basin
#

yes sorry i mean price

honest basin
spare cypress
#

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

honest basin
#

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

spare cypress
#

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.

honest basin
#

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

spare cypress
#

It depends on how you are creating Price records

honest basin
#

manually i could probably stomach. if there was a way to do it faster i'd be all ears

spare cypress
#

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.

honest basin
#

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?

spare cypress
#

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.