#Srujan

1 messages · Page 1 of 1 (latest)

pale surgeBOT
ruby timber
#

Would it be passed into billing_details if the form isn't collecting those?

open trout
#

Hi there, receipt_email is not available in either stripe.confirmPayment() confirm param nor billing_details

ruby timber
#

how do i get stripe to send a user a receipt?

#

to their email?

open trout
#

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.

ruby timber
#

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?

open trout
#

You need to use confirmPayment with PaymentElement. or confirmCardPayment with CardElement

ruby timber
#

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?

open trout
#

The auth-and-capture request needs to initilzed from the server, you can't capture a payment from frontend.

ruby timber
#

Yeah we have it setup on the backend

open trout
#

You can call retrievePaymentIntent API in frontend to retrieve the PaymentIntent and check its status.

ruby timber
#

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?

open trout
ruby timber
#

aaah thank you sorry

open trout
#

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