#gummigun_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ 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/1331568720971038831
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
Both ways are valid, depending on the use case.
If you have fixed Products with fixed Prices, that multiple customers will buy, it's better to pre-create them and reuse. This way you will also have a database of all your stock inside Stripe.
If each purchase price is unique, i.e. customers choose the price, or the amount is negotiated for each purchase individually, then it's better to set it dynamically at checkout.
Cool thank you. So if I create the Price by setting the default_price_data and then my users update the price in my interface... then my update call should be to the Price api with the attached price_id, correct?
or what is the best way to update the price of the product?
or would I need to create a new price and then attach that as the default price to the product?
Yes, you can't really "update" the Price - you have to create a new one and disable the old one. Setting it as default is not crucial, since you will need to explicitly provide the Price ID when you check out anyway.
Cool! Think I've got a better understanding of the flows required. Thank you!