Refunds

The Magento Order Management System (OMS) allows you to manage refunds for any order in the Admin UI or via the API.

The way you handle refunds depends on the type of payment integration that was implemented by your System Integrator (SI)—either CUSTOM or OFFLINE.

The codes and reason_codes in the magento.postsales.refund_management.updated specification can be different, depending on the applied payment integration—CUSTOM or OFFLINE. See the Payments page for more information.

CUSTOM payment integrations

For CUSTOM payment integrations, a magento.postsales.refund_management.updated message is sent just before the refund is requested from the payment gateway:

{
"code":"PENDINGRELEASE",
"reason_code":"REQUESTED"
}

Then, a new message is sent when notification is received from the payment gateway.

OFFLINE payment integrations

For OFFLINE payment integrations, only one magento.postsales.refund_management.updated message is sent. It always contains the same code and reason_code:

{
"code":"RELEASED",
"reason_code":"REQUESTED"
}

After the above message is sent, the OMS completes the refund operation, the item or order is ready to be refunded, and Magento Commerce (MC) issues the refund.

See the Payment exceptions topic for more information on possible refund scenarios.