#ayeshaikh_7

1 messages · Page 1 of 1 (latest)

bronze lilyBOT
quartz escarp
#

Hi there!

#

Can you summarize your question in this new thread?

rocky flare
#

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

quartz escarp
#

Have you tried something and it failed? If so, can you share the request ID (req_xxx)?

rocky flare
#

"request-id": "req_6GlwxFnaXPj0fb",

quartz escarp
#

You need yto provide an Invoice Item (ii_xxx), but you provided a li_xxx. So it's expected to not work.

rocky flare
#

yes, how to update il fields

#

how do I update invoice line item, I want to update tax_rates in invoice line item

quartz escarp
#

Can you share the Invoice ID (in_xxx)?

rocky flare
#

in_1Nxrg5LYNIhg3g0eITjwVe2Q

quartz escarp
#

This Invoice is already paid, so you can't change it.

rocky flare
#

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

civic karma
#

because I saw apis and I could only find update invoice item, and not invoice line items
What you want to update exactly ?

rocky flare
#

how do I update invoice line item, I want to update tax_rates in invoice line item

civic karma
#

How the invoice is generateed first ?

#

You can't update any invoice (line) item

rocky flare
#

it is a subscirption invoice

#

it was created in subscription cycle

civic karma
rocky flare
#

yes, but if I update the rates at subscription level, will my already created draft invoice have those changes?

civic karma
#

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

rocky flare
#

I wan to do these on invoice created event

#

okay

#

how do I test invoice created event for subscription

civic karma
#

You create a Subscription in test mode

rocky flare
#

as soon as it is created the invoice is made paid within few minutes

#

I want it to stay in draft - subscription cycle invoice

civic karma
#

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

rocky flare
#

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