How to generate invoices automatically for Online Payments in online store settings?

If this option is enabled, an invoice will be automatically generated upon placing an order by paying the amount online, without the need for manual conversion into sales.