Set Payment Method "Cash On Delivery" on Particular State Only

Set Payment Method "Cash On Delivery" on Particular State Only

September 25, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Set Payment Method "Cash On Delivery" on Particular State Only

Setting “Cash On Delivery” Payment Method for a Specific State Only in Magento

As an experienced developer, I understand the need for granular control over payment methods based on geographical location. In this guide, we’ll walk through setting up “Cash On Delivery” (COD) as a payment option specifically for a particular state within your Magento store.

1. Enable “Cash On Delivery” Payment Method

First, ensure that COD is enabled in your Magento admin panel:

  • Navigate to System > Configuration
  • Under the Sales section, click on Payment Methods
  • Scroll down and expand the Cash On Delivery section

Enable it by setting “Enabled” to “Yes.” Save the configuration.

2. Create a Restricted Area for Your State

To restrict COD to a specific state, we’ll use Magento’s built-in functionality for creating restricted areas:

  • Go to System > Configuration
  • Click on General in the left-hand menu

Scroll down and locate the Store View Code field. Set it to a unique value (e.g., “main”) and save.

3. Set Up Payment Method Restrictions

Now, let’s configure the payment method restrictions for our state:

  • Navigate back to System > Configuration
  • Under the Sales section, click on Payment Methods

Find your COD payment method in the list of active payment methods.

Click on the “Set Up COD Restriction” button next to it. A new window will open.

4. Configure State-Based Restrictions

In this window:

  1. Set the Restricted Area field to the unique value we created earlier (e.g., “main”).

  2. Select the Specific Countries option.

  3. Click on the drop-down menu for the country selection and choose your specific state, not the entire country.

  4. Save the changes.

5. Test Your Setup

To verify that COD is only available in your defined state:

  1. Log out of the admin panel.

  2. Navigate to your storefront as a customer in the United States (or any other country outside your specified state).

  3. Go through the checkout process and observe that COD is not an option.

  4. Now, set your location to the specific state you configured for COD restrictions and repeat the checkout process. You should see “Cash On Delivery” as a payment method option.

Conclusion

Setting up payment method restrictions by state in Magento requires careful configuration of restricted areas and payment method settings. By following this guide, you can ensure that sensitive methods like COD are only available to customers in your specified region, enhancing security and customer experience.

Remember to regularly review these configurations as business requirements change or when updating your Magento version. If you need more advanced customizations for your payment processing needs, consider reaching out to the experts at Laravel Company for professional assistance.

The key takeaway is that with thoughtful setup and configuration of built-in features, Magento provides robust control over payment methods based on geographical location.

API Admin Configuration CLI

Our network