Postal Code element requirements

59 views
Skip to first unread message

Gina

unread,
Mar 7, 2018, 3:17:39 PM3/7/18
to Stripe API Discussion
Hi there! 

I am trying to split up our current Stripe card element into separate elements/fields on our payment form. 

Upon doing so, I realized that the postal code field would always be visible even if it's actually not required (based on the card number validation). 

Is there a way Stripe allows me to see whether or not this field is required, like how the card element does, so I can determine if the field should be hidden or not?

Thanks!!

Best,
Gina

Remi J.

unread,
Mar 7, 2018, 3:23:46 PM3/7/18
to api-d...@lists.stripe.com
Hey Gina,

This is not something that we support at the moment. We usually recommend that you use the single-line element instead in this situation. Otherwise, you would need to detect their country, either by asking them or using their IP address for example to decide whether to show the postal code field or not.

Hope this helps!
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/.

Gina

unread,
Mar 7, 2018, 4:35:21 PM3/7/18
to Stripe API Discussion
Thanks, Remi for your quick input! I'll pass this back to the team and go on from there. :)


On Wednesday, March 7, 2018 at 12:23:46 PM UTC-8, Remi J. wrote:
Hey Gina,

This is not something that we support at the moment. We usually recommend that you use the single-line element instead in this situation. Otherwise, you would need to detect their country, either by asking them or using their IP address for example to decide whether to show the postal code field or not.

Hope this helps!
Remi
On Wed, Mar 7, 2018 at 3:11 PM, Gina <ginay...@gmail.com> wrote:
Hi there! 

I am trying to split up our current Stripe card element into separate elements/fields on our payment form. 

Upon doing so, I realized that the postal code field would always be visible even if it's actually not required (based on the card number validation). 

Is there a way Stripe allows me to see whether or not this field is required, like how the card element does, so I can determine if the field should be hidden or not?

Thanks!!

Best,
Gina

--
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...@lists.stripe.com.
Reply all
Reply to author
Forward
0 new messages