#tmaquin_api
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/1335900730397036567
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
From the dashboard, I can delete a price if it has never been used, without affecting the product. However, I don’t see any endpoint related to deleting a price object via the API.
correct, you can't delete a price with the API. but you could setactive: falsehttps://docs.stripe.com/api/prices/update#update_price-active
Hi Soma
Indeed, I can set the active parameter to false with the API but if there is only one price and if it's the default price, it will return an error that say i can't
ah maybe yes
With the dashboard, i can archive a price even if it's the default price
yes API and Dashboard work differently
Ok and i would like to know if i manage to delete a product via the API, it's price will be delete as well (indirectly) ?
Maybe that's the only solution for me if i want to delete a price that is not used ?
Or, another suggestion, is there a way to remove the default price attribute via the API ?
I just tried, and got an error: This product cannot be deleted because it has one or more user-created prices.
so no, you just can't delete a Price with the API
but note there's no limit to how many price you can have. so you can just ignore the price you ar enot using (or set them as inactive if needed)
Ok, I'll have to check if it's possible to archive a price. If not, i can try to delete the product and if it's not possible, i'll just archive and let the price active ?
That's the only way with the API ?
Do you know if Stripe will evolve the API in order to make a catalog cleanup easier ?
I'm not sure how it works exactly, so I recommend doing some tests in test mode to see what works.
Do you know if Stripe will evolve the API in order to make a catalog cleanup easier ?
we constantly improve our APIs. but I can't give any more details
Ok thank you i'll do some tests