#aaaaaaaaaaaaaaa - metered to licensed
1 messages · Page 1 of 1 (latest)
Hello, thanks for the details. Have you tried adding the licensed item before deleting the metered one? Would that be viable for you or do you need some proration logic here that that might mess up.
That is the first way I can think to do it off the top of my head. I think this might be possible with one subscription update but will need to look in to it and get back to you
Is that first error from the subscription update call or are you making the call that specifically updates subscription items?
if I tried to add before deleting the metered one it gives this error
Cannot update plans with different usage types. The plan for the subscription item with the ID si_MOBmOSRoSYIS0W is of usage type metered, and you are trying to update to licensed.
when I want to delete subscriptionItem it gives
A subscription must have at least one active plan. To cancel a subscription, please use the cancel API endpoint on /v1/subscriptions.
Gotcha thank you. You may end up needing to cancel the first subscription and create a new one. Checking in to whether you can do this within one subscription
Now that I re-read your latest message, it looks like you are still updating the subscription item directly
btw can we update product of usage type metered to licensed ?
Can you try updating the subscription, adding a new item for your new price, and setting deleted: true on the subscription item that already exists? https://stripe.com/docs/api/subscriptions/update#update_subscription-items-deleted
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.