Magento 2, You can get list of active payment methods using Magento\Payment\Model\Config class.
You need to instantiate Config Class in the construct method of the class to fetch list of active payment methods.
Return methods are both online and offline Payment methods of a system. You can get it by simple code snippets. Continue reading “Get active payment methods list in Magento 2.”