using System.Collections.Generic;
public static void Main()
Options options = new Options();
options.ApiKey = "sandbox-D376GJqCuaG5uQ6OZa5ta7vQUgDREFpi";
options.SecretKey = "sandbox-NbAS8tPKsCG3CI6ZuwqcmU582pGWZ1Gy";
options.BaseUrl = "https://sandbox-api.iyzipay.com";
CreateRefundRequest __CreateRefundRequest = new CreateRefundRequest();
__CreateRefundRequest.Locale = Locale.TR.ToString();
__CreateRefundRequest.PaymentTransactionId = "14018144";
__CreateRefundRequest.Price = "1";
__CreateRefundRequest.Ip = "85.34.78.112";
__CreateRefundRequest.Currency = Currency.TRY.ToString();
Refund __RefundResponse = Refund.Create(__CreateRefundRequest, options);
Console.WriteLine(__RefundResponse.Status);
Console.WriteLine(__RefundResponse.ErrorMessage);