#ilyeselb

1 messages · Page 1 of 1 (latest)

pastel quailBOT
wide meteor
#

Hi there!

steel portal
#

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

wide meteor
#

How are you using Stripe? Checkout Session, Payment Element, something else? And is this for one time payment or subscriptions?

steel portal
#

for one time and im using nextJs payment form

#

i create the invoice then finalize it

#

and retrive it with paymentIntent extnded

wide meteor
#

im using nextJs payment form
Don't know what is this. Maybe Payment Element?

steel portal
#

yes

wide meteor
#

So you create an invoice, get the client_secret of the associated PaymentIntent, and load the Payment Element?

steel portal
#

yes

wide meteor
#

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)?

steel portal
#

one sec

#

please

#

in_1NJDDsGyOBDbEOMCpOHC0EvF this one for exemple

#

so ?

wide meteor
#

Thanks! Give me a few minutes to look into this.

steel portal
#

okay

#

thanks

sacred cliff
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

steel portal
#

okay

sacred cliff
#

What's exactly the process you're following?

steel portal
#

i create invoiceITems then create invoice then finilze it and send it back to the client with clientsecret

sacred cliff
#

At what step are you deleting the extra Invoice Item?

steel portal
#

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

sacred cliff
#

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?

steel portal
#

my question was ihow do i update the invoices items

#

inside an invoice

#

since del an invoice item not updating the invoices automatically

sacred cliff
#

It does, because the deleted Invoice Item is not showing in the finalized Invoice. Do you observe a differernt behavior?

steel portal
#

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

sacred cliff
#

Happy to help!