#madhav-sharma_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. Thank you for your patience!
âąď¸ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
đ 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/1214467775423062037
đ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
Are you using the Payment Element?
So you are looking for a custom country selector, and based on that control the payment method can be displayed on payment element?
Yes @umbral harness that's what I am currently trying to implement
Hmm I think you would want to implement that selector yourself, before the payment page, and then when you come to the payment page, specify allowedCountries on the Address Element initializer https://docs.stripe.com/js/elements_object/create_address_element#address_element_create-options-allowedCountries
So will that take care of the allowed payment methods ?
Hmm could you try in test mode?
Sure, let me get back to you after trying it in test.
@umbral harness
Also can we hide the full name field in the address element
I have tried specifying it with options as
options={{
fields: {
name:'never',
email:'never'
}
}}
for both payment element as well as address element in components
Still it is rendering the name field in the address element
https://docs.stripe.com/js/elements_object/create_address_element#address_element_create-options-fields I think it only has phone inside fields
sorry
No issues but can we do that or is it a required field
I think it's a required field
So can you cofirm it once
Basically configurable options should be in the Doc, so I believe name and email is not customizable here