

No Billing Postal Code? No Problem!
source link: https://developer.squareup.com/blog/no-billing-postal-code-no-problem/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

No Billing Postal Code? No Problem!
How To Remove the Postal Code Field (Square Payment Form)
As Square’s eCommerce platform expands outside the United States and Canada, we’ve heard feedback from developers in other countries (e.g. Japan & Australia), where requesting billing postal codes is uncommon, that they’d like to remove the postal code field in their eCommerce Payment Form.
Good news! Effective today, to remove the postal code field, all you need to do is change one line of code.
When you load the eCommerce Payment Form — replace:
postalCode: {
elementId: 'sq-postal-code'
}
With the following:
postalCode: false
Once this is done, the payment form will load without the postal code field!
Warning: the postal code field is still required to process payment online for merchants based in the United States, Canada, and United Kingdom. Removing the field will result in these transactions being declined.** **With the following error message:
{
"errors": [
{
"category": "INVALID_REQUEST_ERROR",
"code": "INVALID_VALUE",
"detail": "Postal code is required for nonces used by merchants in `US`"
}
]
}
Additional Reading
If you are interested in learning more about how to style the payment form, you can read about it here.

By Matan-Paul Shetrit
@MatanPaulMedium
Recommend
-
37
Postal code validation for multiple countries can always be a pain, but thanks to the Laravel Postal Code Validation package by Choraimy Kroonstuiver , validating postal codes is...
-
12
Postal non-conspiracies Writing Software, technology, sysadmin war stories, and more. Wednesday, June 15, 2011 Postal non-conspiracies Google c...
-
6
Panicking Etsy Sellers Are Afraid Of One-Star Reviews If Postal Delays Ruin Christmas Orders “It does kind of feel like Etsy’s left us to the sharks," said one seller who fears customers will take out their US...
-
9
MySQL Query - select the corresponding postal codes advertisements I need to make a selection based on the first 2 characters of a field, so f...
-
8
UpshotThe Postal Service Survived the Election. But It Was Crushed by Holiday Packages. ...
-
12
-
44
Install Postal Mail Server on Ubuntu 20.04/18.04Search ComputingForGeeksHaving a fully featured email soluti...
-
6
United States Postal Service suspends mail deliveries to New Zealand The United States Postal Service (USPS) has suspended mail deliveries to New Zealand due to an unavailability of transportation.
-
8
Global postal codes regex formats · GitHub Instantly share code, notes, and snippets. Global postal codes regex formats [{...
-
6
January 11, 2023 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK