#Benoît
1 messages · Page 1 of 1 (latest)
Can you tell me the end goal here. Do you want a subscription with nothing on it? Or is this an intermediate step before you put other items back on the subscription?
I forgot one important thing, when i remove an item or cancel the subscription, i don't want to make any proration. Whatever is already paid is paid, no reimbursments
No, i just need to cancel all items when i want to. If many items, i wanted to use subscriptionItems.del, and if a unique item remains, use subscriptions.cancel.
But i would like to have a unique API endpoint that allow to do this, without calling 2 different API endpoint. You see ?
And i don't want any proration at all when this is done
Is there a reason you want to delete the items as opposed to deleting the entire subscription?
Getting rid of prorations is supported, just figuring out what the end goal is
Yes. My app is working on a "per-feature" payment. Each feature has its own plan, and they are all attached to the same subscription
User can stop an item when he wants, and keep others. He can remove item one by one, not in one time
If you want to keep the subscription object going, you can swap out the last item for a $0 item
That being said, there may not be much of a point to having an active $0 subscription. You may find it easier to delete the first subscription and create a new one when the user starts using a paid item again
And from the proration side, you can make sure to pass proration_behavior: "none" when making your API call. Our calls for deleting and updating subscriptions items support that parameter, as do our calls for deleting or updating the subscription itself
https://stripe.com/docs/api/subscription_items/delete#delete_subscription_item-proration_behavior
https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior
https://stripe.com/docs/api/subscription_items/update#update_subscription_item-proration_behavior
Ah for deleting a subscription, the parameter would actually be prorate: false
https://stripe.com/docs/api/subscriptions/cancel#cancel_subscription-prorate
Ok, i didn't understand the way that property worked when reading the docs. Maybe it should be easier to specify the value we can use and their effect
Thank you for your help 👍