All Collections
Multi-Platform Subscription App (Not for Shopify)
Configuring PayWhirl Settings For Your Business
How to prevent or allow checkouts from different countries and/or regions of the world.
How to prevent or allow checkouts from different countries and/or regions of the world.

If you need to prevent customers from checking out in specific countries, regions and/or zip codes PayWhirl can help.

Ryan P. avatar
Written by Ryan P.
Updated over a week ago

PayWhirl provides built-in tools to help you prevent/allow checkouts from specific countries. You can change these settings from the advanced settings page in your PayWhirl account.

On the allowed countries page, you can select/deselect all the checkboxes you'd like to control which countries can place orders. If you deselect a checkbox for a country, it will not appear as an option in widgets when customers checkout.

With several countries, you can also limit signups down to the state level. If you see a blue link for the name of the country, you can click it to select only the states you want to allow:

If you need to limit checkouts to specific regions, we can also help with that but you will need to create a zip code whitelist using our custom scripts app. Once you have installed the custom scripts app you can use a simple script to limit checkouts to specific zip code(s):

<script>
var zips = [30068,90120,30033];
$(function(){
$('input[name=zip]').change(function(){
var currentVal = parseInt($(this).val());
if($.inArray(currentVal, zips) !== -1){
$('.checkout_button').prop('disabled',false);
} else {
$('.checkout_button').prop('disabled',true);
alert('We do NOT service this zipcode: ' + currentVal);
}
});
});
</script>


In the example above there are 3 zip codes that are whitelisted:

var zips = [30068,90120,30033];

If the customer types in one of those three whitelisted zip codes, the script will ENABLE the checkout button, else it will disabled and prevent customers from purchasing. 

If the customer types in one of those three whitelisted zip codes, the script will ENABLE the checkout button, else it will be disabled and prevent customers from purchasing.

NOTE:  This is only an example of what is possible with a custom script. The script above has NOT been fully tested so please make sure to test checkout thoroughly and modify as needed before you implement this on a live website.

Related Articles:

Please let us know if you have any questions. 

Sincerely,
The PayWhirl Team

Did this answer your question?