#Guillaume-PMs
1 messages · Page 1 of 1 (latest)
Hi there! Wow I actually didn't realize you could pass receipt_email to handleCardPayment.
Unfortunately we don't support that on confirmPayment
So yes, it would need to be done on PI create
Or update
Before confirm
Yes, it was very convenient.
Ok, I'll just add it when I create the PI then.
Another migration related question: in your docs you show a call to confirmPayment with "await". Is this necessary? I'm getting errors if I use an await call.
Yes this is an async request because the customer may need to handle 3DS at this time.
Am I correct in understanding that I should still be calling this from the form submit event callback?
If I try with await, I get the following error: Uncaught SyntaxError: await is only valid in async functions, async generators and modules
Yep, did you set async for your top level function?
Can you provide your code snippet?
ev.preventDefault();
const {error} = await stripe.confirmPayment({```
should formSubmit by async then?
Yep
Ok that works! Sorry, JS is not my main language hehe. Thank you so much! 🙂