You can process a refund in Magento by creating a credit memo. The refunds are available only if an invoice is generated. Below is a step-by-step guide on how to perform a partial refund in Magento 2:
The Refund Offline option will not initiate a refund through MasterCard Payment Gateway Services