#PixelNinja-update-session

1 messages ยท Page 1 of 1 (latest)

grave ibex
#

Hello ๐Ÿ‘‹
What metadata are you trying to set exactly?

gritty ferry
#

So, I have the checkout session, which completes and the user returns to my site, then I use the session object which I want to use to save the metadata of emailed status

#

Basically I only want to email them once, not every time they go onto the success page which is provided the checkout session ID

grave ibex
#

So in this case, checkout.session.completed should be generated and delivered to your webhook only once. You may be able to use that event to send the email via your server

gritty ferry
#

Ah I see, is that when the session returns or the purchase is confirmed as complete?

grave ibex
#

I think that's when the session is completed successfully. You could try listening to payment_intent.succeeded event if you want to send an email after the payment succeeds

gritty ferry
#

Ah perfect, thank you, I'll use that!

grave ibex
#

๐Ÿ‘