#Fred-invoice
1 messages ยท Page 1 of 1 (latest)
il_1KTOlMC0QKj18akVcFdWjm38
ii_1KTOlMC0QKj18akVPZODs5SE
Thanks! Give me a few minutes to look into this.
The first ID you shared (il_1KTOlMC0QKj18akVcFdWjm38) doesn't seem to exist on Stripe's end. Are you sure this is the correct ID? Where did you find that ID?
I stored that ID via a webhook
I store the invoices in my DB on the invoices create/update webhooks. So I'm assuming this is because it's still in draft?
So you got the first ID when listening to invoice.created, and the second ID when listening to invoice.updated? And both ID are for the same invoice?
Yes ๐
Got it! Let me try to reproduce this.
I think I understand the problem now.
- I create an invoice item, it's ID is
ii_001 - I create a new invoice (in draft), and listen to
invoice.created. Inlines.data[0].idI seeli_001 - Then I finalize that invoice, and listen to
invoice.updated. Inlines.data[0].idI seeli_001
So the ID in step 2 and 3 is the same. However the ID in step 1 is different.
exactly ๐
so invoice_item is something different, and only for drafts? I actually didn't notice the prefix wasn't the same
Yes invoice items are ii_xxx, and when they are added to an invoice they become line items li_xxx, so it's expected that the ID is different.