#acardillo
1 messages ยท Page 1 of 1 (latest)
DO you ahve an example payment intent ID I can look at that's sending the duplicate emails?
As far as I know, setting receipt_email shouldn't result in a duplicate
I'll grab that, thank you!
pi_3NkXnuFtlfQhNAkB1BSfTVkf
@signal shoal my apologies this is actually the right one
pi_3NkXIbFtlfQhNAkB1VB27EBL
๐ let me take a look!
both of those appear to have two emails sent tho and are from the same connected account
Hmmm... I do see what you mean - I see there were two emails sent, just a couple minutes apart
Ah I forgot about this behavior - you're updating an already created PaymentInttent to set receipt_email
Let me see if there's a way to implement this better so you arent getting those duplicates
I think a simple way to get around this is instead of updating the receipt_email after the PaymentIntent is confirmed you can update it before you do the confirmation
It's the fact that you're updating it after the confirmation is the problem - during the confirmation we send the receipt and when you update it we take it to mean that you want to send the receipt again
@signal shoal which payment intent event should I hook into?
You can listen for payment_intent.created
okay awesome! I'll give that a shot ... thank you for your help, I appreciate it
๐