using System.Collections.Generic;
public static void Main()
Options options = new Options();
options.ApiKey = "sandbox-t1lWRrN28GGhrKzAPOVwCJcU1LMafLab";
options.SecretKey = "sandbox-yi3WsZlLT2gXwlBZ4mHNlq8zgOJ1McpG";
options.BaseUrl = "https://sandbox-api.iyzipay.com";
CreateRefundRequest __CreateRefundRequest = new CreateRefundRequest();
__CreateRefundRequest.ConversationId = Guid.NewGuid().ToString();
__CreateRefundRequest.Locale = Locale.TR.ToString();
__CreateRefundRequest.PaymentTransactionId = "14013428";
__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);