#heymato
1 messages · Page 1 of 1 (latest)
Hi there, I don't see an option for pre-fill, but you can hide it by setting name property to never (https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-name)
When I do so, what is the impact on the stripe details? The will not be in the data dashboard I presume.
If you disable the collection of a certain field with the fields option, you must pass that same data to stripe.confirmPayment or the payment will be rejected.
So when a I create a payment (intent) with billing_details > country set to 'never', I won't be able to set it at confirm either?
The opposite, you need to set it at confirm otherwise the payment won't succeeded.
ah OK
I will try this then
Very much appreciate your fast help.
If I have some issues in trying, can I just continue the conversation here? or do I need to start a new message/thread in discord?
We can continue here if I'm still around. Or you can ask in #dev-help again and my colleague will create a new thread and help you.
👌 Thanks for the help !!
Hi Jack, I'm using following code but when I look into the documentation, I should disable country and/or full name inside the following code: var paymentElement = elements.create('payment');
ah sorry and PaymentForm contains this:
So I don't know where to pass the options here
should I remover the PaymentElement component and create it with code ?
The options is for PaymentElement, no Elements
<PaymentElement
id="payment-element"
options={{
fields: {
billingDetails: {
address: {
postalCode: 'never',
},
},
},
}}
Something like this.
Ah I can pass it that way