#gonsanto_code

1 messages · Page 1 of 1 (latest)

ivory tulipBOT
#

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

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

undone fulcrum
#

we even found the layout: tabs is not working as expected 🤔

#

this is an example when using layout: tabs ... the blue Card was never being shown when tabs and only Card was available

twin abyss
#

Hi, At a high level, PaymentElement collects only the necessary information to process the payment. There’s no way to force the Payment Element to always collect a ZIP unfortunately. So yes they’d need to use the Address Element if they want to always collect some billing address fields with a payment. Let me look into the postal code issue with this version. Hang tight

undone fulcrum
#

ok perfect... I will mention this to the team... the weird thing is that the documentation is saying the post code in the UK should be there 🤔

#

the tab layout was my issue 😄

twin abyss
#

Can you share how you're creating the Element?

undone fulcrum
#

this is the code

          const paymentElementOptions: StripePaymentElementOptions = {
            layout: 'tabs',
          };

          stripeElements = stripe.elements(stripeOptions);
          paymentElement = stripeElements.create(
            'payment',
            paymentElementOptions,
          );
#

we are not modifying anything related to the address

twin abyss
#

Can you set that field to auto and see if the Postal Code is surfaced?

undone fulcrum
#

yes let me try

#

just tried this

          const paymentElementOptions: StripePaymentElementOptions = {
            layout: 'tabs',
            fields: {
              billingDetails: {
                address: {
                  postalCode: 'auto',
                },
              },
            },
          };

          stripeElements = stripe.elements(stripeOptions);
          paymentElement = stripeElements.create(
            'payment',
            paymentElementOptions,
          );

and it is still not showing it

twin abyss
#

Looking

#

I just deleted a message here, so not to confuse us. Given that you're using @stripe/stripe-js": "^8.0.0, you're using the latest version so this is expected.

#

If you require Postal Code, you'd want to use Address Element

undone fulcrum
#

ok so thats really good to know... thank you so much for checking