Log in
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, process refunds, update order states, and optionally notify customers.

It ensures transactional integrity using order locking and validates all refund data before processing.

Public Methods

  • execute()