You can Generate an auto invoice after the order is placed successfully in Magento with the simple configuration.
You can use <payment_action> configuration in the config.xml file to set auto invoice for your custom payment method.
You can check programmatically Convert Order to Invoice Programmatically in Magento 2.
Using payment_action, You don’t need to generate manual action to create an invoice for the order.
You have to just create a config.xml file under your module etc directory. Continue reading “How to generate auto invoice by payment_action for custom payment methods in magento 2?”