#nyxi_docs

1 messages ¡ Page 1 of 1 (latest)

real rootBOT
untold kestrelBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

real rootBOT
#

👋 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/1245118457343770796

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

rain shore
#

Hi there!

wide dragon
#

Greetings

rain shore
#

So, if you omitted some billing_details fields when creating the PaymentElement, you should still collect these some other way (either with your own input fields earlier in the flow or you may already have some customer information in your database and don't want the customer to provide this information again)

#

When you confirm the PaymentIntent, you will need to pass any billing_details fields you opted to hide (with never) when rendering the PaymentElement, and the values for those.

#

Let me know if that's clear!

wide dragon
#

Okay, so if I provide "auto" (or dont provide it), i can choose to provide it or not when confirming?

#

Also that sentence could use some work. I had a lot of trouble even making sense of it.

rain shore
#

Yes, though if you provide auto and the customer provides a value in the PaymentElement and you also provide a different value in your confirmation call, the PaymentElement value takes precedence

wide dragon
#

Alright, I want to explicitly disable it from payment elements and provide it myself or require it in payment elements

#

Is it possible to require it in elements?

#

The latter makes it easier to build for the simple reason that I won't have to have email input validation at all

rain shore
#

No, it's only possible to pass either never or auto. If auto, the PaymentElement will only collect that value if it's required for a successful payment

wide dragon
#

And in which case is it required?

rain shore
#

Yep, that's right. For example, when paying by credit card, an email is not required so email: auto won't display an email field in the PaymentElement when a customer clicks on "card". If you pass email: never, you must provide an email value when confirming the payment even if the customer clicks on "card"

wide dragon
#

Okay, so I will have to do manual collection like that

#

outside the elements, I mean

#

Since I always require an email

rain shore
#

Right so you could set up your own input form to collect an email and then either pass the customer-provided value when confirming the payment or separately adding that value to the customer in an earlier part of the flow

wide dragon
#

Okay cool