Skip to content

[5.x]: Add “Country” Condition Rule for Payment Gateway Availability in Craft Commerce 5 #4098

@wmdhosting

Description

@wmdhosting

What happened?

Description:

In Craft Commerce 5, the new condition rules system for payment gateways is great but can be better :)
Setting up geo-based availability — such as restricting gateways based on shipping metods currently requires complex configuration

Use Case:

A common scenario for merchants is to enable or disable certain payment gateways based on the customer’s country. For example:

Only allow Klarna in some EU countries

Only enable Stripe for some other Countries customers

Disable Cash on Delivery for other countires..

Currently, replicating this behavior using shipping zones is not user frienldy — which isn't ideal for store owners or developers looking for a straightforward setup.

Feature Request:

Please consider adding a "Country" condition rule to payment gateway availability conditions. This rule should evaluate the customer’s shipping country, billing country, or both — similar to how shipping zone rules work.

Benefits:

Greatly simplifies setup for country-specific payment logic

Reduces need for custom plugin development

Aligns condition rules with real-world commerce scenarios

More intuitive for merchants managing international stores

Craft CMS version

5.8.13

Craft Commerce version

5.4.4

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions