#Srujan
1 messages · Page 1 of 1 (latest)
Would it be passed into billing_details if the form isn't collecting those?
Hi there, receipt_email is not available in either stripe.confirmPayment() confirm param nor billing_details
You can specify a receipt_email when creating or updating a PaymentIntent
Alternatively, if this PaymentIntent is associated with a customer and the customer has an email. You can also enable email sending in Dashboard (https://dashboard.stripe.com/settings/emails) and Stripe would send email to customers for successful payemnts.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
sounds good thanks!
Wait so another question...
We need to verify other things before we want to verify or cancel the payment. On confirmPayment it seems it only returns an error object if there's an error but the promise doesn't resolve if the payment is successful. What if I want to cancel payment before it goes through like I would for confirmCardPayment?
Is there any way to use confirmCardPayment with the Stripe Payment Element?
You need to use confirmPayment with PaymentElement. or confirmCardPayment with CardElement
Is preAuthorizePayment, capture, and cancel compatible with Payment Element? We have it setup on CardElement flow but I'm not sure how we would do it since confirmPayment doesn't return a paymentIntent or status
I guess I'm wondering how i can call capturePaymentSecret on the backend upon success?
and cancelPaymentSecret on error?
The auth-and-capture request needs to initilzed from the server, you can't capture a payment from frontend.
Yeah we have it setup on the backend
You can call retrievePaymentIntent API in frontend to retrieve the PaymentIntent and check its status.
ah I see
can you link please?
actually nvm found it
Wait...
you mean on the backend?
we have a backend endpoint (calling capturePaymentSecret and cancelPaymentSecret) that we call from the frontend so would I just hit those endpoints upon success or error?
You can just retrieve the paymentIntent from frontend , this is the JS API: https://stripe.com/docs/js/payment_intents/retrieve_payment_intent
aaah thank you sorry
No problem. Also note that not all PaymentIntent's properties can be retrieved from frontend with publishable key you can refer to the API reference to see what properties can be retrieved with a publishable key