#Szymon From Poland
1 messages · Page 1 of 1 (latest)
Yeah, that's not a valid confirmPayment parameter. You'd need to pass receipt_email when either creating, updating or confirming the PI server-side
okay, and is there a way to access email address specified in paymentElement using useElements?
I don't believe so, there's a change event you can listen to but it doesn't contain any sensitive/PII data from the Element: https://stripe.com/docs/js/element/events/on_change?type=paymentElement
so how can I get what email was specified from webhook, if I want to send an email to that address?
let's say that I'm using after pay as shown on the attached screenshot and after successful purchase I want to send something to that email
You'd listen for payment_intent.succeeded events and it'd be on the payment_method field (which you'd need to expand)
okay, got it