#-reduce-_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/1313424711761526795
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
You can use this API to delete a subscription item https://docs.stripe.com/api/subscription_items/delete
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay and that will remove this from subscription and leave only one item so the price will be lower right?
I need to iterate over all subscriptions and check if subscription has this subscription item with product that i want to remove or there is any easier way to do this?
No there's no batch API for subscription update, you need to update one by one
okay thank You. And the lower price will be applied since next billing period?
The change will be applied immediately. https://docs.stripe.com/billing/subscriptions/upgrade-downgrade
Sure
I created subscription with two items on test environment and deleted unnessesary item with stripe.SubscriptionItem.delete("si....")
and next Invoice now its for value 0 and should be 290
did I something wrong ?
it's hard to say without looking at the example. Remember that proration exists. https://docs.stripe.com/billing/subscriptions/upgrade-downgrade#proration That can cause an invoice to have a negative amount and thus a 0 charge.
Okay so how can I delete subscription item to leave this 290 on next invoice?
not sure, because I don't have all the information. But maybe try passing proration_behavior:"none" when you delete the item? https://docs.stripe.com/api/subscription_items/delete#delete_subscription_item-proration_behavior