After Create Convert Request Successfully you can complete your request.
Endpoints
POST /api/Payment/CompleteConvertRequest
Request
URI Parameters
Name | Type | Additional information |
---|---|---|
RequestId | globally unique identifier | ConvertRequesId from "Create Convert Request" |
Response
Name | Type | Additional information |
---|---|---|
Status | string | Show status of request |
Payment | object | Payment complete details |
convertRequest | object | Convert Request details |
Errors | String array | All the necessary files that you need to upload |
Example Request
public async Task<object> CompleteConvertRequest(string access_token, Guid RequestId)
{
using (var client = new HttpClient())
{
try
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", access_token);
var queryParameters = new Dictionary<string, string>
{
{ "RequestId", RequestId.ToString() },
};
var dictFormUrlEncoded = new FormUrlEncodedContent(queryParameters);
var queryString = await dictFormUrlEncoded.ReadAsStringAsync();
var url = root + "/api/Payment/CompleteConvertRequest";
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
"Status": "Convert Completed Successfully",
"convertRequest": {
"RequestId": "c55d10e2-692d-4887-8d73-980041c42ee9",
"BuyAmount": "1,000.00 ILS",
"ChargeAmount": "281.90 USD",
"FinalQuote": null
},
"Errors": null
}
Errors Index
Error Number | Description |
---|---|
607 | Request Not Found |
610 | Convert Failed |
611 | The time for convert passed please refresh your quote and try again (use RefreshConvertRequest(RequestId)) |
612 | Missing amount in your wallet |
613 | Profile not approved |
614 | General Error |
500 | Server error |
401 | Unauthorized (need to login) |
400 | Bad inputs |
404 | Url Request Not Found |