#Uche - Subscription
1 messages · Page 1 of 1 (latest)
Hi
You remove a product from a subscription by updating the Subscription items. Have you tested out reseting the items to not include the product?
Changing quantity is not a method to remove an item so that would be expected.
i updated the subscription item with this code
stripe.Subscription.modify("sub_1L6K7FJOFr5bboslb9MIkyu8", items = [{"id": "si_LnvzJju6vEqPnR", "quantity": 0}], prorate=False)
is there a specific code in the apis documentation for reseting the items of the subscription?
So you want to empty the items in this subscription? The customer is subscribed to nothing?
nope. i was just doing a spike for multi-product invoicing and i'm trying to figure out how it behaves in certain scenarios
so if i drop the quantity of one product to 0 it wont automatically be removed fro the subscription. I understand that now.
I would try passing a new set of items that doesn't include an object for the item you want to remove
oh ok
i'll try that out and see what happens
but in that case it would mean updating the whole subscription and not just its items
stripe.Subscription.modify
is this assumption correct?
Well you are updating the actual subscription by making changes to the items.
stripe.Subscription.modify("sub_XXXXX", items=[{'id': 'some_other_thing", "quantity": 2},])
thats true.
oh wait
what if i dont want to add something new
just drop one of the existing items
what would the request look like