#Teelu

1 messages · Page 1 of 1 (latest)

hollow coralBOT
final dove
#

Hello, good question. Checking in to this and will get back to you

#
      {
        id: subscription.items.data[0].id,
        price: 'price_CBb6IXqvTLXp3f',
      },
    ],```
chrome basin
#

If i mark it as deleted, the pending updates complains that im setting a field which is not possible with pending updates

#

deleted is not in the supported attributed

#

so if im going from 2 sub items to 1, i can change the price on item 1, but i need to delete item 2

#

all i can change is item price/quantity

final dove
#

My apologies for missing that. Have you tried setting the quantity to 0? I'll check if we have other recommendations here but that is worth trying in test mode at least

chrome basin
#

setting it to 0 does technically work, but then the invoice contains that price as a line item and is still part of their subscription

final dove
#

Gotcha, was going to also suggest an alternative of switching to a $0 and removing later but yes both of those options do make for confusing invoice items

chrome basin
#

yeahh all those options dont convey the 'correct' subscription after

#

and we use the subscription items on our backend to map to a plan, so depending on which prices a subscription has, it alters that mapping if a $0/0 quantity item exists

#

but i also need to make sure subscriptions dont move back to an active state if their payment doesn't go through

final dove
#

Gotcha, I've reached out to my colleagues to see if there is another potential workaround. If not, I would the easiest way to go would be to do the $0 price swap and add logic on your backend to handle that plan and I can put in a feature request to support the deleted param in future

chrome basin
#

yeah supporting the deleted flag in pending updates seems like it would be the best option, its the same thing as setting the quantity to 0 but actually removes the item if the payment is successful

#

ill see what i can do to support pending_updates for now, but its definitely way more useful if you can alter the items more than just price and quantity

#

If there is another workaround, would gladly be willing to listen

final dove
#

A colleague confirmed that we don't currently have another workaround. So I will add to the feedback to support deleted on pending updates but for not those workarounds will be the way to go

hollow coralBOT