After creating payment request, you need to upload the files that show in necessary files from " Create Payment Request Response".


POST /api/Payment/UploadPaymentFile


URI Parameters

NameTypeAdditional information
paymentRequestIdglobally unique identifierPaymentRequesId Id from "Create Payment Request"
fileTypeintfile Type for "Create Payment Request" 1- stamp, 2- sign, 3-regular(all rest)

Body Parameters

NameTypeAdditional information
fileIdfileIdNeed to upload file in body


NameTypeAdditional information
fileIdglobally unique identifierThe file Id was created successfully

Example Request

public async Task<object> UploadPaymentFile(string access_token, Guid paymentRequestId, int fileType)
            using (var client = new HttpClient())
                using (var content = new MultipartFormDataContent())
                        byte[] imgdata = System.IO.File.ReadAllBytes(HttpContext.Current.Server.MapPath("~/img/page2.jpg"));

                        var file = new StreamContent(new MemoryStream(imgdata));
                        file.Headers.ContentType = new MediaTypeHeaderValue("image/jpeg");

                        content.Add(file, "page2", "page2.jpg");

                        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

                        client.DefaultRequestHeaders.Authorization =
                         new AuthenticationHeaderValue("Bearer", access_token);

                        var queryParameters = new Dictionary<string, string>
                        { "paymentRequestId", paymentRequestId.ToString() },
                        { "fileType", fileType.ToString()}
                        var dictFormUrlEncoded = new FormUrlEncodedContent(queryParameters);
                        var queryString = await dictFormUrlEncoded.ReadAsStringAsync();

                        var url = root + "/api/Payment/UploadPaymentFile";
                        var response = client.PostAsync(url + $"?{queryString}", content).Result;

                        if (response.IsSuccessStatusCode)
                            string result = await response.Content.ReadAsStringAsync();
                            return result;

                        else return response.StatusCode;
                    catch (Exception e)
                        return "Exception: " + e.Message;

Example Response