public void OrderRefundPayment() { // TODO uncomment below to test the method and replace null with proper value string id = null; var authorization = authorizationApi.AuthorizationCreateToken("https://auth-dev.partpay.co.nz"); var createOrderRequest = CreateRequest(CreateOrderRequest.PaymentFlowEnum.Payment); var createOrderResponse = instance.OrderCreate(authorization, "IK006", createOrderRequest); id = createOrderResponse.OrderId; System.Threading.Thread.Sleep(2000); // Give the system time to complete the creation of the order var order = instance.OrderGet(authorization, id); var refund = new CreateRefundRequest(50, "Refund test"); var response = instance.OrderRefund(authorization, id, "IK007", refund); Assert.IsInstanceOf <RefundOrder>(response, "response is Refund"); }