#smitit1999

1 messages · Page 1 of 1 (latest)

balmy micaBOT
placid geyser
#

Yes if the invoice is draft status. Update and delete invoice items API can be used:

fickle orchid
#

But since that line item is generated as a part of a subscription item and isn't a one time invoice item, will the above mentioned endpoints still work?

placid geyser
#

Are you going to change the subscription item permanently, or just one time?

fickle orchid
#

Let me explain my use-case, so there's a renewal invoice where a particular line item is billing for a quantity let's say 10. I want to update the quantity to 5 in that renewal invoice since it's still in a draft state, so which is why I want to update the line item of that particular invoice. But I don't see any endpoint in the documentation that lets me do so. Hence, wanted to know if that was possible or not

balmy micaBOT
humble scarab
#

Hi @fickle orchid I'm taking over this thread

fickle orchid
#

I am able to add invoice items, but I want to modify/remove an existing invoice line item that is generated due to the subscription item on a subscription. E.g. a renewal invoice

humble scarab
#

Sure, I believe ria has already sent you the links, have you tried them out?

fickle orchid
#

hey @humble scarab , that won't work right cause the line item type is subscription and not invoiceitem

humble scarab
fickle orchid
#

hey @humble scarab , if you check the invoice present in the particular event - https://dashboard.stripe.com/test/events/evt_1OCGVGGRs9Vv0S2iysS8PbiY

In this case, if you check the line items, you can see that no line item has any invoice item field associated with it, since they are generated due to the subscription item. Hence I can't use the invoice item endpoints

humble scarab
#

I mean the ID of the request you made to update a invoice item but failed

fickle orchid
#

That's what I am trying to imply, since the object isn't an invoice item, how can I make the call to update it using the above endpoints

humble scarab
fickle orchid
#

Didn't get you

humble scarab
#

Use this API to get the list of invoice items of a invoice.

fickle orchid
#

I hit this API for the particular invoice - in_1OCGUQGRs9Vv0S2irMJxRYxm and this was the response

    "object": "list",
    "data": [],
    "has_more": false,
    "url": "/v1/invoiceitems"
}```

Which is what I am saying, the line items in the invoice are of the type subscription and not invoice items
humble scarab
#

No you can't edit subscription items, the workaround here is to add negative amount invoice items to offset the amount of subscription items.

fickle orchid
#

Understood, thank you