#jm199seo-delete-invoice-items
1 messages · Page 1 of 1 (latest)
Hi there, you can first retrieve the invoice item and check if quantity is 0 with https://stripe.com/docs/api/invoiceitems/retrieve
The delete the relative items that are 0 https://stripe.com/docs/api/invoiceitems/delete
Which webhook should I be listening to if I'm trying to delete invoice items?
I've noticed that the invoices cannot be modified once it enters a created or finalized state, so that leaves me with the drafted state. Am I correct?
- the price model is a recurring payment of one month
There is an invoiceitem.delete event: https://stripe.com/docs/api/events/types#event_types-invoiceitem.deleted
You are correct, an invoice can be modified when it is in drafted state, if you would like to learn more about the different invoice statuses, please refer to https://stripe.com/docs/invoicing/overview
if I were to delete an invoice item at some point in the billing cycle, then update the quantity of a subscription item by creating a new usage record, would the invoice item be created automatically again?
Also, I'm assuming auto_advance must be set to false in order to delete invoice items before the finalized state.
Because the invoice.upcoming webhook does not contain an invoiceID, I'm curious about when I will be able to edit the invoice, assuming that I'm using a metered usage_type
I'm sort of confused, I'm not seeing the link between reporting quantity on a metered plan (since that's how I read what you're using since you mention UsageRecord) and invoice items, reporting usage doesn't create invoice items. Or do you mean it's a licensed price and you're referring to invoice item for proration that is generated when changing the quantity ? If the latter, it would create entirely new items for the new proration