#ayeshaikh_7
1 messages · Page 1 of 1 (latest)
hi, I want to update tax rates on invoice created event for a subscription invoice - in case the tax rate was changed for that location
Have you tried something and it failed? If so, can you share the request ID (req_xxx)?
"request-id": "req_6GlwxFnaXPj0fb",
You need yto provide an Invoice Item (ii_xxx), but you provided a li_xxx. So it's expected to not work.
yes, how to update il fields
how do I update invoice line item, I want to update tax_rates in invoice line item
Can you share the Invoice ID (in_xxx)?
in_1Nxrg5LYNIhg3g0eITjwVe2Q
This Invoice is already paid, so you can't change it.
yes
okay
but is there any way I can update the line item of the invoice
because I saw apis and I could only find update invoice item, and not invoice line items
Hey! Taking over for my colleague. You can update the invoice item via this API
https://stripe.com/docs/api/invoiceitems/update
because I saw apis and I could only find update invoice item, and not invoice line items
What you want to update exactly ?
how do I update invoice line item, I want to update tax_rates in invoice line item
Here is what you can update for a Subscription's invoice:
https://stripe.com/docs/billing/invoices/subscription#Customize
If you want to update the tax_rate, then you need to do it at the Subscription level:
https://stripe.com/docs/api/subscriptions/update#update_subscription-items-tax_rates
yes, but if I update the rates at subscription level, will my already created draft invoice have those changes?
No
Ah wait
I think it should generate a new invoice
I'm not sure, I invite you to test it
But the only way to achieve this is via updating at the Subscription
I wan to do these on invoice created event
okay
how do I test invoice created event for subscription
You create a Subscription in test mode
as soon as it is created the invoice is made paid within few minutes
I want it to stay in draft - subscription cycle invoice
Yes
You can have draft invoices on renewal but not on creation
You need to find another place where to do the Subscirption Update
and not on the creation
yes, i want the renewal one only
as soon as it is created the invoice is made paid within few minutes
I want it to stay in draft - subscription cycle invoice