Model
RefundOrder
Magento\Sales\Model\RefundOrder
What it does
This class handles the complete refund process for Magento 2 orders.
Developers use it to programmatically create credit memos and process refunds, including validation, state management, database transactions, and optional customer notifications.
It's the main entry point when you need to refund an order through code rather than the admin interface.
Public Methods
- execute()