#andrei_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1341392158535716864
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
hey!
you mean you want to have a "name" input field in the payment element?
then you'll need to add you own <input> tag above the Payment Element. then you can pass that information when you confirm the PaymentIntent on the frontend: https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
so, there is no option to set billing name in PaymentElement, like it exist in AddressElement for example?
so, there is no option to set billing name in PaymentElement
I just explained how to add it.
ok, got it
but why do we need fields?: FieldsOption (that contains name, address, email, phone) in StripePaymentElementOptions?
what is the purpose of this interface?
Hey! Taking over for my colleague. I'm not sure I understand your latest follow up qustion. What is the issue you are facing ?
Hey hey!
The issue, that I'm facing is that I want to see "name" input field in Payment Element on the UI and I want to know how I can make it required, since in StripePaymentElementOptions we do have "fields" with "billingDetails", that contains name, address, phone etc.
you know, AddressElement contains Full Name field
but its in address element
is it possible to show this field in Payment Element since there is such field in PaymentElementProps
The issue, that I'm facing is that I want to see "name" input field in Payment Element on the UI and I want to know how I can make it required,
No you can't make it required
if you want to have it always, then create your own input and remove the name field from all Stripe Elements
Control which fields are displayed in the Payment Element.
how can I control it?
I can only remove it?
yes