#ayeshaikh_7
1 messages · Page 1 of 1 (latest)
hi! what's the overall use case or problem you're trying to solve?
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
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
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",
I'd suggest trying it and seeing what happens, that's what I did just now and it seemed to do what I wanted