PHPackages                             smaex/customer-group-payments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. smaex/customer-group-payments

AbandonedArchivedMagento2-module[Payment Processing](/categories/payments)

smaex/customer-group-payments
=============================

Restricts payment methods to specific customer groups in Magento 2.

2.0.0(7y ago)167766MITPHPPHP ^7.1

Since Nov 4Pushed 7y agoCompare

[ Source](https://github.com/jensscherbl/customer-group-payments)[ Packagist](https://packagist.org/packages/smaex/customer-group-payments)[ RSS](/packages/smaex-customer-group-payments/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (5)Used By (0)

Magento 2: Customer Group Payments
==================================

[](#magento-2-customer-group-payments)

Restricts payment methods to specific customer groups in [Magento 2](https://github.com/magento/magento2).

Intro
-----

[](#intro)

Adding additional checks to payment methods – to decide if a certain payment method is applicable to a certain customer or not – is pretty easy and straight forward in Magento 2.

Magento [provides a rather simplistic interface](https://github.com/magento/magento2/blob/2.3/app/code/Magento/Payment/Model/Checks/SpecificationInterface.php) for custom payment method checks, and [uses a composite check](https://github.com/magento/magento2/blob/2.3/app/code/Magento/Payment/Model/Checks/Composite.php) to process these individual checks. Adding a custom check is therefore just a matter of injecting it into Magento’s composite check via dependency injection.

This extension implements such a custom check to decide if a certain payment method is applicable to a customer based on the customer group, along with a corresponding system configuration field for payment methods.

[![Screenshot: Magento system configuration field for payment methods that restricts a payment method to selected customer groups.](https://user-images.githubusercontent.com/1640033/47964356-25660200-e039-11e8-81dc-7ccc9785c2bc.png)](https://user-images.githubusercontent.com/1640033/47964356-25660200-e039-11e8-81dc-7ccc9785c2bc.png)

Prerequisite
------------

[](#prerequisite)

Unfortunately, there’s currently a limitation in Magento’s code regarding this mechanism that requires us to use a small workaround, so this extension depends on another extension providing this workaround. See [smaex/additional-payment-checks](https://github.com/smaex/additional-payment-checks) for more information.

How to install
--------------

[](#how-to-install)

Simply require the extension via [Composer](https://getcomposer.org).

```
$ composer require smaex/customer-group-payments ^2.0
```

Finally, enable the module via [Magento’s CLI](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html).

```
$ magento module:enable Smaex_CustomerGroupPayments
```

How to use
----------

[](#how-to-use)

While the extension provides you with all the tools you need to restrict payment methods to specific customer groups, it doesn’t do anything without some custom configuration on your part. That’s because adding system configuration fields [is done via XML configuration](https://github.com/magento/magento2-samples/blob/master/sample-module-payment-gateway/etc/adminhtml/system.xml) in Magento.

To properly configure your payment methods, the best way going forward is probably to [set up your own custom module](https://devdocs.magento.com/guides/v2.3/architecture/archi_perspectives/components/modules/mod_intro.html) (e.g., `Acme_Payment`) under `app/code`.

Declaring a dependency on `Magento_Payment` and `Smaex_CustomerGroupPayments` in your `module.xml` is kinda mandatory, dependencies on other modules like `Magento_OfflinePayments` depend on the payment methods actually used in your project.

```

```

The next and already final step is then to provide your own `system.xml` under `etc/adminhtml` in your custom module and extend the existing configuration for each payment method used in your project.

```

```

Alternative
-----------

[](#alternative)

If you’re a lazy sloth this looks like too much work (i.e., XML configuration), there’s also [another extension tackling the same problem from a very different angle](https://github.com/galacticlabs/customer-group-payment-filters).

We’re hiring!
-------------

[](#were-hiring)

Wanna work for [one of Germany’s leading Magento partners](https://www.techdivision.com/karriere/offene-stellen/magento-developer-m-w.html)? With agile methods, small teams and big clients? We’re currently looking for experienced masochists **PHP &amp; Magento developers in Munich**. Sounds interesting? Just drop me a line via

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~47 days

Total

4

Last Release

2601d ago

Major Versions

1.1.1 → 2.0.02019-03-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6efc76b9774f586b05d3c0429c3458aa3c672cbba47f30069acdc6f5db28b22?d=identicon)[jensscherbl](/maintainers/jensscherbl)

---

Top Contributors

[![jensscherbl](https://avatars.githubusercontent.com/u/1640033?v=4)](https://github.com/jensscherbl "jensscherbl (5 commits)")

---

Tags

magentopaymentphpmagentopaymentcustomer group

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/smaex-customer-group-payments/health.svg)

```
[![Health](https://phpackages.com/badges/smaex-customer-group-payments/health.svg)](https://phpackages.com/packages/smaex-customer-group-payments)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
