#napolean_solo

1 messages · Page 1 of 1 (latest)

prisma sapphireBOT
lusty path
#

My question is which invoice ID should i use to finalize? Should I use the ID that i got initially when that came with invoice.created event or the id i received after getting the response after i added another invoice item when it was in the draft state?
This invoice ID should not change here -- if you're adding items to an existing raft invoice, that invoice id (like in_123) should be constant in that flow

#

Can you share a specific example of events/requests for me to look at and explain?

#

Are you perhaps thinking of the invoice item id after you add one?

molten terrace
#

yes

#

after i add one

#

i think i get it. So basically when I add an invoiceItem to the same invoice the id i receive in the response is basically the id of the invoice Item I just added, right?

#

so to finaliza i need to add the original id i received when I got the invoice.created event.

lusty path
#

Correct -- you'd finalize using the original invoice id (the same one you added an item to)

#

If you tried using the item id you'd get an invalid invoice id error