#dingkai031
1 messages · Page 1 of 1 (latest)
Hello
The way Payment Element works is it only collects the minimum required billing details for the payment method type that is being used.
If you want to always collect something like name/email then you would want to build your own inputs outside of Payment Element for that.
Then you can have Payment Element hide those fields using fields.billingDetails.name: 'never' so that you don't duplicate collection.
ahh I see, so then if I put my own input outside of the stripe elements. Can I later attach the data into this payment method? so that it wont be empty..
Yep you would pass it on confirmPayment(): https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
I see, thank you !