Hello, Magento mates.

Welcome to MageComp Magento tutorials.

Today, we will learn to list active payment methods using command line in your Magento 2 store.

Magento 2 has undoubtedly helped many online store owners to take their business online and excel in the eCommerce world.

Magento 2 supports a variety of payment methods, including credit cards, PayPal, bank transfers, and more. These methods represent the various ways customers can make payments for their purchases on your Magento 2 store. When you configure and enable a payment method in the Magento 2 admin panel, it becomes active and visible to customers during the checkout process.

Steps to List Active Payment Methods Using Command Line

Step 1 –

First, we need to create “di.xml file” inside our Magento 2 extension by following the below path 👇


Step 2 – 

Once you are done, you need to create GetPaymentList.php file inside our extension by following this path. 👇


Step 3 –

Once you have entered the code correctly, run the commands given below 👇

Output 👇

List of active payment methods using command line in Magento 2

Final Say

And this is how it is done.

Magento 2 active payment methods are the payment options that are currently enabled and available for customers to use during the checkout process. These payment methods in Magento 2 play a crucial role in providing a smooth and diverse checkout experience for your customers by allowing them to choose the payment option that suits them best.

Hope you found this blog informative. If you have any queries about this blog or any Magento 2 feature, kindly contact us or text us on our official Facebook page, and if you have any trouble with your Magento 2 store, you can also hire our Magento developers at affordable rates.

Happy Coding!!!

Click to rate this post!
[Total: 0 Average: 0]