#kitem-subscriptions
1 messages · Page 1 of 1 (latest)
hi! you need to pass the ID of the existing items (si_xxx)
see how the example code snippet at https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#changing passes an id, that is required
if you don't pass that, you are not changing the existing items to a new plan, you're actually just adding two new items on top of whatever items currently exist
Oh ok, it's mandatory so to pass the ID to override it
but I still does not understand how can I add multiple pricing to update a subscription.
My use case is:
Customer has an active base plan, customer can add other features to the plan that are other items
well you can't have multiple items with the same Price price_xxx on the same subscription.
you can set a quantity on each item, or use different Prices, it really depends on the details.
ok, that makes sense, but in my request body the price_xxx are different
or I'm missing something?
yeah but you probably had an existing item using one of them
oh ok
like you probably created the subsctiption using price_1KyHqhE9n8wrXE2ivZDYZpC7 and then in that update call you tried adding a new item with that same Price(when instead you should either use a different price or update the quantity of the existing one by passing {id:si_xxxx, quantity:2} for instance)
so basically:
- If i want to substitute a price_xxx I need to specify it with the id
- If i want just to add a price_xxx I can just send it like I'm doing right now, without passing the one is already active
yep