#stealth_cardelement-postalcode

1 messages ยท Page 1 of 1 (latest)

silk brambleBOT
#

๐Ÿ‘‹ 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/1215721295812231209

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

inland needleBOT
#

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.

upper harbor
inland needleBOT
upper harbor
#

If I enter 5 digits then validation works.

#

Is there a way to disable ZIP code validation?

#

Correction. HidePostalCode = false

toxic wagon
#

The Card Element is a bit older and has edge cases like this where it uses the card BIN to know which country validation it use for the postal code

upper harbor
#

I just found documentation. So with test cards ZIP is always US code. But in production, ZIP code should work with CC issued in different country?

toxic wagon
upper harbor
#

When I use one of international cards post field disappears

toxic wagon
#

Yeah because some countries don't have the concept of a postal code - if you were to try one of the GB cards you'd see it

upper harbor
#

I tried Slovenia. And there are postal codes

silk brambleBOT
#

stealth_cardelement-postalcode

upper harbor
#

I mean... In Slovenia there are postal codes. Card element does not show the field tho

toxic wagon
#

For some countries we also choose not to collect postal codes - I don't think we have a canonical list

#

If always grabbing the potsal code is something that's important to your integration I'd suggest hiding it in the card element and collecting it through your own UI (so you have control over when to collect it). Alternatively, you could look into using Payment Element which is newer and has slightly different logic for when to collect postal code

upper harbor
#

I will take a look into payment element. Thank you

inland needleBOT
toxic wagon
#

๐Ÿ‘

upper harbor
#

It appears that PE does not have ZIP code for Slovenia either.

#

Is there a property in card elements / PM elements that I can use to determine if ZIP code is supported or not?

timber cairn
#

Hi ๐Ÿ‘‹

Can you share the code you are using to create and mount the payment element and a screenshot of what you see?

upper harbor
#

If I select US, then ZIP code appears at the bottom

#

This is checkout but I assume payment element will work the same way

#

Only US and UK have ZIP code field. No other country has it

timber cairn
#

As my colleague stated, this is expected. If you require postal code collection all the time, you should add an input to collect this in your integration. By default the Payment Element only collects the information it needs depending on the Payment Method and the country.