Elements forcing a postal code

522 views
Skip to first unread message

Cory

unread,
Oct 13, 2017, 8:51:17 PM10/13/17
to Stripe API Discussion

Elements seems to be handling ZIP/postalcodes incorrectly. This issue occurs only when you are using the Elements API in split-up parts, such as Card Number, ZIP, and CVC, as opposed to using the all-in-one solution that they offer.


If you go to the Stripe elements example page located here: https://stripe.com/elements/examples

And take a look at example 2 (the one with the yellow Pay button), it forces the user to input a postal code even when the country tied to the credit-card does not use one (Hong-Kong, for instance).


You can easily test this using Stripe's own International Test Card Numbers.


If you try to click the Pay button without entering a zip, you get the error,



Your postal code is incomplete.



which is incorrect.


You can see that here:



Many countries simply don't require a postcode - so this seems to be a pretty big issue. The API seems to be able to determine the internationalization of the card, because the all-in-one examples HIDE the zip field for this case. Hoping there is a solution - or a fix. Thanks!

Remi J.

unread,
Oct 13, 2017, 9:02:03 PM10/13/17
to api-d...@lists.stripe.com
Hey Cory,

Thanks for the detailed report! We're looking into it and I'll follow up once I've synced with our engineering team!

Best,
Remi

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

Michelle Bu

unread,
Oct 26, 2017, 7:01:14 PM10/26/17
to Stripe API Discussion
Hey Cory,

We just released a change that fixes this issue -- going forward, filling in the postalCode Element will only be required in countries where postal code verification is meaningful.

Hope this helps!
Michelle

Cory Tyburski

unread,
Oct 26, 2017, 7:28:40 PM10/26/17
to api-d...@lists.stripe.com
Hi there,

Thanks for letting me know!
Reply all
Reply to author
Forward
0 new messages