#script-cardelement-email
1 messages · Page 1 of 1 (latest)
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
gotcha
thanks
by collecting in my own form would it reflect on stripe
in the customer row
if you pass the information in the right place in our API yes
that would be the email parameter on the Create Customer API https://stripe.com/docs/api/customers/create
nice
but how can I then attach the customer to the payment
or would that be automatic
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
so in general you would recommend using payment element correct?
since the card element is quite old
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
alright
thanks a lot Koopajah
that'll be all