• USD
  • English (Us)

How to Restrict Payment Methods in Magento 2 by Shipping Methods and Regions?

How to Restrict Payment Methods in Magento 2 by Shipping Methods and Regions?

There’s no doubt that Magento 2 is a powerful eCommerce platform. Together with Shopify and WooCommerce, these three are the most widely used eCommerce platforms worldwide. Over the years, there has been a greater interest in Magento 2 primarily because of its customisability.

One example of this customisability is that it allows merchants to restrict payment methods based on shipping methods or regions. For example, if a customer has opted to use FedEx or selected location A for delivery, only allowed payment methods will be shown to them.

In other words, if you have disabled cash on delivery or credit card for this shipping method or location, the customer cannot select it. The entire purpose of these restrictions is to ensure compliance with legal requirements, streamline operations, and improve profitability.

So, the question is how can a merchant set up these restrictions? That’s precisely what we intend to discuss today.

Why Set Up Magento 2 Restrict Payment Method?

  • Cost Effectiveness

    Our research tells us that FedEx charges more compared to UPS. Therefore, when a user selects FedEx for shipment, the merchant’s shipping costs increase unless they decide to pass it onto the customer. In that case, the customer may abandon their cart due to high shipment costs.

    Now, let’s suppose the merchant decides to bear the cost themselves. When it comes to payment method, the user has selected credit card. In most cases, credit card payment gateways charge the highest fees. In this scenario, the merchant is paying the highest fees in terms of shipment and payment gateway.

    Thus, their profitability goes down significantly. It would be better to prevent users from using credit cards if they opt for FedEx shipping method. The better approach is to offer FedEx with payment methods that have the lowest costs such as cash on delivery or even direct bank transfer.

  • Compliance

    Certain payment methods may not be accessible in specific regions due to legal or other reasons. For example, PayPal is available in 200 countries/regions. Nevertheless, there are certain countries which PayPal does not serve, including Afghanistan, Pakistan, Monaco, and more. It makes no sense to offer PayPal to customers in these countries. Similarly, Visa and Mastercard no longer serve the Russian market.

  • User Experience

    By automatically removing payment methods which are not available to the users, you can ensure a better user experience. Instead of wasting time on finding the methods which do work for them, they can focus on completing the purchase.

Setting Up Magento 2 Payment Method Restrictions by Shipping Methods and Regions

Before proceeding further, it is important to mention that Magento 2 does have in-built functionality for restricting payment methods. However, this functionality is not as advanced as those offered through third-party extensions. Therefore, it is better to use an extension such as Magento 2 Payment Restrictions Extension by FME. This extension offers numerous features that Magento 2 does not offer, including:

  • Restrictions Based on Cart and Product Attribute e.g. Product, Product Category, Order Value
  • Customer Attributes
  • Customer Groups
  • Week, Day, Time
  • Store Views

For this article, our focus is primarily on restricting payment methods based on shipping methods and region. Our guide will tell you how to do so using the extension by FME. To know more about the extension, check out the backend and frontend demos. You can also book a live demo with our team to gain a more comprehensive understanding.

Magento 2 Restrict Payment Method Based on Shipping Region

After installing the extension, go to FME EXTENSIONS -> Manage Restrictions Rules.

Click on ‘Add New Rule’ as indicated in the above image. Afterwards, a new tab will open which contains the below information. Enter the following information:

    • Name: Assign any name or ID to the rule.
    • Status: Enable/Disable the rule.
    • Payment Methods: Select which payment methods which you wish to restrict.
    • Store Views: If you have multiple store views, select the one you wish to apply the restriction to.
    • Priority: 0 is for low priority and 1 for high priority.
    • Apply Operation As: Set operation to AND if all conditions fulfil the requirement / Set to OR if any of the condition fulfils the requirements.

Now, head to the ‘Restrict by Billing Address’ Section as shown below.

You will then get the following options:

Enter the required information and then click on ‘Save’. Conduct a test transaction to assess if the restriction is working as desired.

Magento 2 Restrict Payment Method Based on Shipping Method

Follow the same instruction as before. Once you assign the ‘Priority’, don’t scroll down to ‘Restrict by Billing Address’. Instead go to the ‘Conditions’ tab.

Click on the ‘+’ button and then the dropdown menu. A menu popup will appear as shown below:

Tap on ‘Shipping Method’ and then click on ‘…’ as shown below.

Click on the dropdown menu button to decide which shipping method you wish to apply the restriction to as indicated below.

Suppose you wish to apply the restriction to DHL Express Worldwide. Just tap on it and that’s it.

Don’t forget to click on ‘Save’. Again, conduct a dummy transaction to ensure that the restriction is working as desired. Apart from this, with the Magento 2 Payment Restrictions Extension, you can add multiple restrictions and assign them different priorities.

Final Thoughts on Magento 2 Payment Restrictions Based on Shipping Method and Region

This concludes our article on setting payment method restrictions in Magento 2 based on the user’s selected shipping method and their region. These two restrictions can be helpful in streamlining operations, cutting costs, and ensuring compliance with relevant regulations. If you have any questions related to the article, extension, or anything Magento related, reach out to our support team. Thank You.

This blog was created with FME's SEO-friendly blog