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:
If adjustment amounts are not entered and you click on the “Refund” button, the entire amount will be refunded.
The Refund Offline option will not initiate a refund through MasterCard Payment Gateway Services