Log in
Model

RefundInvoice

Magento\Sales\Model\RefundInvoice

What it does

This class handles the process of refunding an invoice in Magento 2.

Developers would use this class (or its interface) when they need to programmatically create a credit memo and process a refund for a previously invoiced order, either online (through payment gateway) or offline.

It manages the entire refund workflow including validation, state management, database transactions, and customer notifications.

Public Methods

  • execute()