#Jasmeet - tax rate
1 messages · Page 1 of 1 (latest)
You can update each invoice item's tax rate: https://stripe.com/docs/api/invoiceitems/update#update_invoiceitem-tax_rates
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah, I have seen that. Is there any way to update all line items in a single API call?
Some of the invoices have 10s of invoice line items and we have included a feature to set a tax rate for whole invoice which should udpate tax rates for all line items.
You can set the default on the invoice: https://stripe.com/docs/api/invoices/update#update_invoice-default_tax_rates
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is the only way to do this is by updating each invoice item one by one?
But not a way to specify different ones for each invoice item in 1 call
Oh okay! Thanks
Hey, I don't wanna specific different tax rates on invoice items.
I want to update all invoice items with a single tax rate.
Suppose I have 10 invoice items already created, I just want to tax rate for all of them.
Maybe I am not clear, sorry.
This is the UI of my app. By changing this field I want to update tax amount of all invoice items.
Updating the default_tax_rates does not updates the tax amount of already created invoice items
If a user changes the tax rate, it should update the tax amount for already created line items too. So, I am asking if that can be done in a single API call as some invoices have a lot of invoice items and updating each invoice item causes a lot of latency.
So you have invoice items that already explicitly have a tax_rate set?
No
Updating default_tax_rate updates the default tax rate of an invoice but it does not updates the tax amount of already created invoice items.
Hey, it works.
I was passing an empty array [] for no tax rate.
⤴️ This didn't give an error but it didn't removed the default tax rate also.
I just checked that we need to pass an empty string.
I am really sorry. Thanks for the help
No problem. Glad you got it