#script-cardelement-email

1 messages · Page 1 of 1 (latest)

lavish kayakBOT
lucid quail
#

script-cardelement-email

#

our CardElement component focuses solely on card details. If you want to collect email (or anything else like the full name or address) you would collect this separately in your own form

grave dawn
#

gotcha
thanks

#

by collecting in my own form would it reflect on stripe

#

in the customer row

lucid quail
#

if you pass the information in the right place in our API yes

grave dawn
#

nice
but how can I then attach the customer to the payment
or would that be automatic

lucid quail
#

You control all of thios end to end fully with your code

#

Like you're using CardElement which is quite old and usually tailored for advanced users that want full control over their entire payment flow

#

So as the developer, you ask for an email, you create a Customer on your server and then a PaymentIntent for that Customer and then use that PaymentIntent's client_secret client-side with CardElement to collect card details and confirm the payment

grave dawn
#

so in general you would recommend using payment element correct?
since the card element is quite old

lucid quail
#

yes

#

though that doesn't really change that if you want to show an email in that column you still have to first create a Customer with the right email and link it to your existing PaymentIntent

grave dawn
#

alright
thanks a lot Koopajah
that'll be all