Create full refund
You can create a full refund using the SDK below. For details on the request parameters, check the Create refund API.
MercadoPagoConfig.AccessToken = "YOUR_ACCESS_TOKEN";
var client = new MercadoPago.Client.Payment.PaymentRefundClient();
client.Refund(payment_id);
Create partial refund
You can create a partial refund using the SDK below. For details on the request parameters, check the Create refund API.
MercadoPagoConfig.AccessToken = "YOUR_ACCESS_TOKEN";
var client = new MercadoPago.Client.Payment.PaymentRefundClient();
MercadoPago.Resource.Payment.PaymentRefund refund = await client.RefundAsync(payment_id, (decimal?)0.0);