Charge on website without ZIP code

Is there any way to not make customers input zip code when entering their credit card on an ecommerce website?

Or, only card number and zip code without having to enter last 3 ?

You can remove it by setting postalCode: false in the SqPaymentForm (see here for more info: https://developer.squareup.com/docs/payment-form/cookbook/sqpaymentform-customization#remove-the-postal-code-requirement), but note that it is required in US, Canada, and United Kingdom, so if you do not supply it, the payment will fail.

That’s awesome.
Are these combinations below possible?

  1. only enter card number, and a zip code
  2. only enter card number, and expiration dates
  1. No
  2. If you have an application set up in Japan or Australia, then you can get by without requesting the postal code. Of course you need to also always request the CVV in all scenarios.
1 Like

A bit odd I’m getting an error message trying to charge an american card without zip code:

        [category:Square\Models\Error:private] => INVALID_REQUEST_ERROR
        [code:Square\Models\Error:private] => INVALID_VALUE
        [detail:Square\Models\Error:private] => Postal code is required for nonces used by merchants in `US`

This is the code I put in .JS file:

      locationId: "--------------",
       inputClass: 'sq-input',
       postalCode: false,
     inputStyles: [{
         fontSize: '.9em'
      }],

I know Stripe allows taking payments without zip code. It’s odd I actually think I was able to charge without zip code and I think it even worked once I don’t remember…but anyway, now it doesn’t :S

As mentioned above, it’s required for merchants setup in the US, UK, and CA.

1 Like

Hi SJosey,

How can i disable postal code using Web SDK?

Hi @devgti, currently the ability to disable the postal code isn’t currently available. The Web SDK automatically detect if the postal code is necessary since it’s localized. :slightly_smiling_face:

1 Like

Hello, Is there any way to prepopulate/pass the zip code in? In our case, the customer has already filled out this data in the checkout billing address. Thanks

Yes, you can definitely pre-populate the zip code with the Web Payments SDK by setting the CardOptions in the Card. :slightly_smiling_face:

Hi @Bryan-Square

I have a question about the following statement in the Web Payments SDK.

currently the ability to disable the postal code isn’t currently available. The Web SDK automatically detect if the postal code is necessary since it’s localized.

I would like to know the conditions under which the zip code form is displayed.

It depends on the bank that issues the card and the region that it’s issued from. :slightly_smiling_face:

1 Like

Thank.
If you figure it out, please let me know what region you need the zip code.

Hey Bryan, I want to know how to solve this issue. Problem is:

  • When a customer enters the card number, the zip code field does not appear maybe
    because the bank that issues the card and the region that it’s issued from does not have
    a zip code.
  • I can not set postalCode: as false, because I am located in the USA.

I want to have the payments from these customers also, what should I do now?

Hey, I want to know how to solve this issue. Problem is:

  • When a customer enters the card number, the zip code field does not appear maybe
    because the bank that issues the card and the region that it’s issued from does not have
    a zip code.
  • I can not set postalCode: as false, because I am located in the USA.

I want to have the payments from these customers also, what should I do now?

The Web Payments SDK shows a postal code input field on the payment form after the SDK determines the country that issued the buyer’s credit card. The Web Payments SDK displays the proper form label for the postal code based on the country:

  • For US, the form displays “ZIP”.
  • For CA, the form displays “Postal Code”.
  • For UK, the form displays “Postcode”.

If the payment form displays the postal code field, then the payment requires a postal code for the buyer to proceed. The Web Payments SDK enforces input field validation for the postal code depending on the country. :slight_smile:

Hi @Bryan-Square ,

I am using the WooCommerce Square plugin, and our site is based in AU. In the Sandbox, the ZIP code exists as I cannot change the default account, so we test using a US-based Zip code, which is fine.

When we take the site live on a .com.au, will this disappear as the Square account will have the AU designation? If not, how do I disable this for AU?

Many thanks!

Steve

The Web Payments SDK will automatically infer whether or not it will ask for the zip code based on the card numbers the customer puts in. There is no configuration necessary. :slightly_smiling_face: