#ilyeselb
1 messages · Page 1 of 1 (latest)
i have an issue on my app if i do a oneTime payment i got too the checkout it create the invoice but if i got back then do it again , it create an invoice with 2 lines.data item (duplicated product) so i thought if i del duplicated invoice item it will update automaticaly the invoices
but i think its not
How are you using Stripe? Checkout Session, Payment Element, something else? And is this for one time payment or subscriptions?
for one time and im using nextJs payment form
i create the invoice then finalize it
and retrive it with paymentIntent extnded
im using nextJs payment form
Don't know what is this. Maybe Payment Element?
yes
So you create an invoice, get the client_secret of the associated PaymentIntent, and load the Payment Element?
yes
but if i got back then do it again , it create an invoice with 2 lines.data item (duplicated product)
And you want to remove the duplicate product? Can you share the invoice ID (in_xxx)?
Thanks! Give me a few minutes to look into this.
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
okay
What's exactly the process you're following?
i create invoiceITems then create invoice then finilze it and send it back to the client with clientsecret
At what step are you deleting the extra Invoice Item?
i added some code , after creating the invoice , i get the invoiceItems related to the invoice , check if there is duplicated product and del the invoice item
before finlize it
but i dont know if its possible to update the invoice items in the invoice
I don't see the deleted Invoice Item in the finalized invoice.
So it should've worked out well. What's not working for you exactly?
my question was ihow do i update the invoices items
inside an invoice
since del an invoice item not updating the invoices automatically
It does, because the deleted Invoice Item is not showing in the finalized Invoice. Do you observe a differernt behavior?
i will re test to see if the invoices lines.data still have the duplicated products
yes it does
thanks you
have a nice day
Happy to help!