#ayeshaikh_7

1 messages · Page 1 of 1 (latest)

golden kestrelBOT
mental sierra
#

hi! what's the overall use case or problem you're trying to solve?

remote junco
#

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

mental sierra
#

something like

invoice = await stripe.invoices.retrieve(invoice.id)
let ii= await stripe.invoiceItems.update(
  invoice.lines.data[0].id,
  {tax_rates: ["txr_1MjiEnJoUivz182DbPNfw3ZB"]}
);

works as far as I know

remote junco
#

I saw the api to update invoiceItems and id looked like ii_xyz

but what I want to update is line item "id": "il_1Nxrg5LYNIhg3g0e0bymyDya",

#

will this work with "id": "il_1Nxrg5LYNIhg3g0e0bymyDya",

mental sierra
#

I'd suggest trying it and seeing what happens, that's what I did just now and it seemed to do what I wanted