Before Create Payment, you need to create a payment request with Beneficiary id from beneficiaries list.


POST /api/Payment/CreatePaymentRequest


URI Parameters

NameTypeAdditional information
beneficiaryIdglobally unique identifierBeneficiary id from beneficiaries list
amountdecimal numberThe amount you want to send it's depended on beneficiary currency
costTypeintCost Type Key CostList from "Create Quote Response" 1-Regular, 2-Our


NameTypeAdditional information
PaymentRequesIdglobally unique identifierNone.
Amountdecimal numberSend amount to beneficiary
CostTypeintCost Type you Chosen
CostAmountdecimal numberCost Amount for cost type
NecessaryFilesString arrayAll the necessary files that you need to upload

Example Request

public async Task<object> CreatePaymentRequest(string access_token, Guid beneficeryId,decimal amount,int costType)
            using (var client = new HttpClient())
                    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

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

                    var queryParameters = new Dictionary<string, string>
                        { "beneficiaryId", beneficeryId.ToString() },
                        { "amount", amount.ToString() },
                        { "costType", costType.ToString() },

                    var dictFormUrlEncoded = new FormUrlEncodedContent(queryParameters);
                    var queryString = await dictFormUrlEncoded.ReadAsStringAsync();

                    var url = "http://localhost:65405/api/Payment/CreatePaymentRequest";
                    var response = client.PostAsync(url + $"?{queryString}", null).Result;

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

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

Example Response

    "PaymentRequesId": "0ae84124-0000-4b1a-8836-b0e395ca28a6",
    "Amount": 500.0,
    "CostType": 2,
    "CostAmount": 25.0,
    "NecessaryFiles": [
        "Sign File Needed for 'Green route declaration'.",
        "Stamp file exist but if you have new one you need to upload the file.",
        "Upload a transaction invoice file."