InPay provides a REST Web Service Interface that allows two-way flow of information to external systems. This enables automated and efficient transfer of data to and from your other systems reducing effort and duplication.
If you wish to know the commercials or costs involved in using Web Services then please contact the Client Account Management team. If you would like to enable the use of Web Services please contact our Support team and an estimate will be raised. It will need to be enabled on your system and a set of credentials for accessing the service will be supplied.
The full technical https://inpay.es.rsmuk.com/WebServicesREST/Help
Scenarios and uses
This section describes various scenarios of how the Web Services can be used.
Authentication
Before you can call any other InPay Web Service method you must first call the authenticate() method. Providing valid credentials to this method will return an authentication token that must be provided with all other Web Service calls.
Data Retrieval (Read operations)
There are a number of methods that enable you to read back the full details of an entity. Examples are api/Person/{employeeNo} where providing the correct employee number will return the full Person object and api/Payment/{employeeNo} which will return all the permanent payments in the system for an employee
Data Creation (Write Operations)
It is now possible to create data in InPay via the Web Services. This includes the following the person entity and many of the entities related to the worker (for example pension and absence records)
C# Code
Authenticate
private string Authenticate()
{
string token = null;
if (String.IsNullOrEmpty(username.Text) || String.IsNullOrEmpty(password.Text) || String.IsNullOrEmpty(companyID.Text))
{
return "Credentials missing";
}
FormUrlEncodedContent content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("grant_type", "password"),
new KeyValuePair<string, string>("companyId", companyID.Text),
new KeyValuePair<string, string>("username", username.Text),
new KeyValuePair<string, string>("password", password.Text)
});
var request = new HttpRequestMessage(HttpMethod.Post, restURL.Text + "token");
request.Content = content;
HttpResponseMessage response = client.PostAsync(restURL.Text + "token", content).Result;
if (response.IsSuccessStatusCode)
{
Task<Object> res = response.Content.ReadAsAsync<Object>();
Console.WriteLine("Auth result: " + res);
Console.WriteLine("Auth result type: " + res.GetType());
Console.WriteLine("Auth result string: " + res.Result);
...
InPay provides a REST Web Service Interface that allows two-way flow of information to external systems. This enables automated and efficient transfer of data to and from your other systems reducing effort and duplication.
If you wish to know the commercials or costs involved in using Web Services then please contact the Account Management team. If you would like to enable the use of Web Services please contact our Support team and an estimate will be raised. It will need to be enabled on your system and a set of credentials for accessing the service will be supplied.
The full technical https://inpay.es.rsmuk.com/WebServicesREST/Help
Scenarios and uses
This section describes various scenarios of how the Web Services can be used.
Authentication
Before you can call any other InPay Web Service method you must first call the authenticate() method. Providing valid credentials to this method will return an authentication token that must be provided with all other Web Service calls.
Data Retrieval (Read operations)
There are a number of methods that enable you to read back the full details of an entity. Examples are api/Person/{employeeNo} where providing the correct employee number will return the full Person object and api/Payment/{employeeNo} which will return all the permanent payments in the system for an employee
Data Creation (Write Operations)
It is now possible to create data in InPay via the Web Services. This includes the person entity and many of the entities related to the worker (for example pension and absence records)
C# Code
Authenticate
private void GetPerson()
{
try
{
if (String.IsNullOrEmpty(token))
{
output.Text = output.Text + "\r\nAuthentication failed "private string Authenticate() { string token = null; if (String.IsNullOrEmpty(username.Text) || String.IsNullOrEmpty(password.Text) || String.IsNullOrEmpty(companyID.Text)) { return "Credentials missing"; } FormUrlEncodedContent content = new FormUrlEncodedContent(new[] { new KeyValuePair<string, string>("grant_type", "password"), }); var request = new HttpRequestMessage(HttpMethod.Post, restURL.Text + "token"); HttpResponseMessage response = client.PostAsync(restURL.Text + "token", content).Result; { Task<Object> res = response.Content.ReadAsAsync<Object>(); } else { Console.WriteLine("Auth Was not successfulresult type: " + responseres.StatusCodeGetType()); } response.Dispose(); } |
---|
Retrieve a Worker
string url = restURL.Text + "api/Person/" + employeeID.Text
Newtonsoft.Json.Linq.JObject jObj = (Newtonsoft.Json.Linq.JObject)res.Result; } else { |
---|
output.Text = output.Text + "\r\nAuthenticated: " + token.ToString();
Console.WriteLine("Auth Was not successful: " + response.StatusCode); |
---|
nAuth Was not successful: " + |
---|
response.StatusCode; |
---|
requestMessage.Headers.Add("Authorization", "Bearer " + token);
Console.WriteLine("About to do GET from " + url);
HttpResponseMessage response2 = client.SendAsync(requestMessage).Result;
if (response2.IsSuccessStatusCode)
{
Task<Object> res2 = response2.Content.ReadAsAsync<Object>();
Console.WriteLine("GET Person result: " + res2);
Console.WriteLine("GET Person result string: " + res2.Result);
person = res2.Result;
var results = JObject.Parse(res2.Result.ToString());
if (results["message"] != null)
{
Console.WriteLine("GET Person was not successful: " + results["message"]);
output.Text = output.Text + "\r\nGet Person failed: " + results["message"];
}
else
{
var personDetails = results.Value<JObject>("Person").Properties();
var personDict = personDetails.ToDictionary(k => k.Name, v => v.Value.ToString());
var addressDetails = results.Value<JObject>("AddressDetail").Properties();
var addressDict = addressDetails.ToDictionary(k => k.Name, v => v.Value.ToString());
var employmentDetails = results.Value<JObject>("EmploymentDetail").Properties();
var employmentDict = employmentDetails.ToDictionary(k => k.Name, v => v.Value.ToString());
} response.Dispose(); } |
---|
Retrieve a Worker
private void btnAddPayment_Click(object sender, EventArgs e)
{
try
{
output.Text = "";
var token = Authenticate(); if (String.IsNullOrEmpty(token))
{ output.Text = output.Text + "\r\nAuthentication failed ";
}
else
{
output.Text = output.Text + "\r\nAuthenticated: " + token.ToString();
Object result = null;string url = restURL.Text + "api/Payment/" + employeeID.Text;
private void GetPerson() try { if (String.IsNullOrEmpty(token)) { output.Text = output.Text + "\r\nAuthentication failed "; } else { output.Text = output.Text + "\r\nAuthenticated: " + token.ToString(); Object person = null; output.Text = output.Text + "\r\nDoing GET from URL: " + url; if (response2.IsSuccessStatusCode) { Task<Object> res2 = response2.Content.ReadAsAsync<Object>(); var results = JObject.Parse(res2.Result.ToString()); { Console.WriteLine("GET Person was not successful: " + results["message"]); } else { var personDetails = results.Value<JObject>("Person").Properties(); { var paymentDetailsvar addressDetails = results.Value<JObject>(" PaymentDetailAddressDetail").Properties(); var addressDict = paymentDetailsaddressDetails.ToDictionary(k => k.Name, v => v.Value .ToString());} else { paymentDict = null; } Dictionary<string, string> starterStatementDict; { var starterStatmentDetails.ToString()); var employmentDetails = results.Value<JObject>(" StarterStatementDetailEmploymentDetail").Properties(); var employmentDict = starterStatmentDetailsemploymentDetails.ToDictionary(k => k.Name, v => v.Value.ToString()); } else { starterStatementDict = null; } Dictionary<string, string> p45Dict; var NIDetails = results.Value<JObject>(" P45DetailNIDetail").Properties(); var NIDict = p45DetailsNIDetails.ToDictionary(k => k.Name, v => v.Value.ToString()) ;} ; { var taxDetails paymentDetails = results.Value<JObject>("TaxDetailPaymentDetail").Properties(); } else { taxDict paymentDict = null; } Console.WriteLine("personDetails:" + personDict) Dictionary<string, string> starterStatementDict; { var starterStatmentDetails = results.Value<JObject>("StarterStatementDetail").Properties(); } else { starterStatementDict = null; } Dictionary<string, string> p45Dict; var p45Details = results.Value<JObject>("P45Detail").Properties(); } p45Dict = null; } var taxDetails = results.Value<JObject>("TaxDetail").Properties(); } taxDict = null; } if (personDict["EmailEmployeeNumber"] != null) emailemployeeNumber.Text = personDict["EmailEmployeeNumber"]; title.Text = personDict[" PayslipNotificationTitle"] )){payslipNotification.CheckState = CheckState.Checked ; } payslipNotification.CheckState = CheckState.Unchecked; } } personDict[" SMSPayslipNotificationMiddleNames"] )){ smsPayslipNotification.CheckState = CheckState.Checked; } smsPayslipNotification.CheckState = CheckState.Unchecked; } }!= null) middleNames.Text = personDict["MiddleNames"]; postponeDate null) dateOfBirth.Text = personDict["DateOfBirth"]; Gender"]; } postponeDate.CustomFormat = " "; } if (Boolean.Parse(personDict[" OptOutDatePayslipNotification"] != "")) payslipNotification. CustomFormat = "yyyy/MM/dd";optOutDate.Text = personDict["OptOutDate"] CheckState = CheckState.Checked; } optOutDate.CustomFormat = " "; }if (personDict["Method"] != null) method.Text = personDict["Method"]; payslipNotification.CheckState = CheckState.Unchecked; } } if (Boolean.Parse(personDict[" AccrueDaysOverrideSMSPayslipNotification"] != null) accrueDaysOverride.Text = personDict["AccrueDaysOverride"];if (personDict["OSPScheme"] != null) ospScheme.Text = personDict["OSPScheme"]; if (addressDict["Date )) smsPayslipNotification.CheckState = CheckState.Checked; } smsPayslipNotification.CheckState = CheckState.Unchecked; } } if (personDict["PostponeDate"] != null && addressDictpersonDict["DatePostponeDate"] != "") addressDatepostponeDate.CustomFormat = "yyyy/MM/dd"; } addressDate.CustomFormat = " "; } if (addressDict["AddressLine1"] != null) addressLine1.Text = addressDict["AddressLine1"];if (addressDict["AddressLine2"] != null) addressLine2.Text = addressDict["AddressLine2"]; if (addressDict["AddressLine3 postponeDate.CustomFormat = " "; }
} optOutDate.CustomFormat = " "; } addressDate.CustomFormat = "yyyy/MM/dd"; } addressDate.CustomFormat = " "; } if (addressDict["AddressLine1"] != null) hoursCategoryaddressLine1.Text = employmentDictaddressDict["HoursCategoryAddressLine1"]; if (Boolean.Parse(employmentDict["IrregularPayments"])) irregularPayments.CheckState = CheckState.Checked; } irregularPayments.CheckState = CheckState.Unchecked; } } if (Boolean.Parse(employmentDict["OffPayrollWorker"])) offPayrollWorker.CheckState = CheckState.Checked; } offPayrollWorker.CheckState = CheckState.Unchecked; } } if (employmentDict["ApprenticeaddressLine3.Text = addressDict["AddressLine3"]; if (Boolean.TryParse(employmentDict["Apprentice"], out bool apprentice)) if (apprentice) Apprentice.CheckState = CheckState.Checked; } else { Apprentice.CheckState = CheckState.Unchecked; } Apprentice.CheckState = CheckState.Unchecked; } }county.Text = addressDict["County"]; if (employmentDict[" JobTitleDateOfJoining"] != null) strtJobTitledateOfJoining.Text = employmentDict[" JobTitleDateOfJoining"]; ServiceStartDate"] != null) workerPayTypeserviceStartDate.Text = employmentDict[" WorkerPayTypeServiceStartDate"]; Payroll"] != null) { contractedHourspayroll.Text = employmentDict["ContractedHoursPayroll"]; } contractedHours.Text = ""; } if ( NIDictemploymentDict[" NINumberWorkgroup"] != null) niNumberworkgroup.Text = NIDictemploymentDict[" NINumberWorkgroup"]; employmentDict[" NITableLetterHoursCategory"] != null) niTableLetterhoursCategory.Text = NIDictemploymentDict[" NITableLetterHoursCategory"]; employmentDict[" DirectorIrregularPayments"] != null) if (Boolean.Parse( NIDictemploymentDict[" DirectorIrregularPayments"])) irregularPayments.CheckState = CheckState.Checked; } irregularPayments.CheckState = CheckState.Unchecked; } } employmentDict[" NonCumulativeNIOffPayrollWorker"] != null) if (Boolean.Parse( NIDictemploymentDict[" NonCumulativeNIOffPayrollWorker"])) offPayrollWorker.CheckState = CheckState.Checked; } offPayrollWorker.CheckState = CheckState.Unchecked; } } if ( NIDictemploymentDict[" DirectorStartDateApprentice"] != null && NIDict) if (Boolean.TryParse(employmentDict[" DirectorStartDate"] != ""Apprentice"], out bool apprentice)) if (apprentice) directorStartDateApprentice.CustomFormat = "yyyy/MM/dd"; } else { Apprentice.CheckState = CheckState.Unchecked; } directorStartDateApprentice.CustomFormat = " "CheckState = CheckState.Unchecked; } } if (paymentDict employmentDict["JobTitle"] != null) employmentDict[" AccountNameWorkerPayType"] != null) accountNameworkerPayType.Text = paymentDictemploymentDict[" AccountNameWorkerPayType"]; if ( paymentDictemploymentDict[" AccountNumberContractedHours"] != null) accountNumber
contractedHours.Text = employmentDict["ContractedHours"]; } contractedHours.Text = paymentDict[ "AccountNumber"]; } if ( paymentDictNIDict[" SortCodeNINumber"] != null) sortCodeniNumber.Text = paymentDictNIDict[" SortCodeNINumber"]; NIDict[" RollNumberNITableLetter"] != null) rollNumberniTableLetter.Text = paymentDictNIDict[" RollNumberNITableLetter"]; } if (starterStatementDict NIDict["Director"] != null) if ( starterStatementDictBoolean.Parse(NIDict[" StarterStatementDirector"] != null) starterStatement.Text = starterStatementDict["StarterStatement"];if (starterStatementDict["StudentLoanPlanType )) { director.CheckState = CheckState.Checked; } director.CheckState = CheckState.Unchecked; } }
if (Boolean.Parse(starterStatementDictNIDict["StudentLoanRepayDirectlyNonCumulativeNI"] != null) studentLoanRepayDirectly.Checked = Boolean.Parse(starterStatementDict["StudentLoanRepayDirectly"]); nonCumulativeNI.CheckState = CheckState.Checked; } nonCumulativeNI.CheckState = CheckState.Unchecked; } } directorStartDate.CustomFormat = "yyyy/MM/dd"; } directorStartDate.CustomFormat = " "; } if (p45Dict paymentDict != null) if (p45DictpaymentDict["P45EmployersReferenceAccountName"] != null) p45EmployersReferenceaccountName.Text = p45DictpaymentDict["P45EmployersReferenceAccountName"]; { p45LeavingDate.CustomFormat = "yyyy/MM/dd"; } p45LeavingDate.CustomFormat = " "; } if (p45Dict["P45PeriodNonull) accountNumber.Text = paymentDict["AccountNumber"]; } if ( p45DictstarterStatementDict != null) if (starterStatementDict["P45TaxablePayStarterStatement"] != null) p45TaxablePaystarterStatement.Text = p45DictstarterStatementDict["P45TaxablePayStarterStatement"]; { if (studentLoanBeforeLast6April.Checked = Boolean.Parse( p45Dict["P45Wk1Mth1"])){ p45Wk1Mth1.CheckState = CheckState.Checked; } p45Wk1Mth1.CheckState = CheckState.Unchecked; } }starterStatementDict["StudentLoanBeforeLast6April"]); } if (p45Dict != null) if (p45Dict["P45TaxDistrictNoP45EmployersReference"] != null) p45TaxDistrictNop45EmployersReference.Text = p45Dict["P45TaxDistrictNoP45EmployersReference"]; { p45LeavingDate.CustomFormat = "yyyy/MM/dd"; P45LeavingDate"]; } if (taxDict != null){
p45LeavingDate.CustomFormat = " "; } if (taxDictp45Dict["StartDateP45PeriodNo"] != null) taxStartDatep45PeriodNo.Text = taxDictp45Dict["StartDateP45PeriodNo"]; { if (Boolean.Parse(taxDict["TaxBasis"])) { taxTaxBasis.CheckState = CheckState.Checked; } taxTaxBasis.CheckState = CheckState.Unchecked; } } } } } Console.WriteLine("GET person was not successful: " + response2.StatusCode); } if (person == null) p45TaxPaid.Text = p45Dict["P45TaxPaid"]; { if (Boolean.Parse(p45Dict["P45Wk1Mth1"])) p45Wk1Mth1.CheckState = CheckState.Checked; } Console.WriteLine("Get Person returned:" + person.ToString()); } } } Console.WriteLine("Exception in Get Person:" + ex); } |
---|
Add a Payment
p45Wk1Mth1.CheckState = CheckState.Unchecked; } } if (p45Dict["P45TaxDistrictNo"] != null) p45TaxDistrictNo.Text = p45Dict["P45TaxDistrictNo"]; } if (taxDict != null) if (taxDict["StartDate"] != null) taxStartDate.Text = taxDict["StartDate"]; { if (Boolean.Parse(taxDict["TaxBasis"])) { taxTaxBasis.CheckState = CheckState.Checked; } taxTaxBasis.CheckState = CheckState.Unchecked; } } } } } Console.WriteLine("GET person was not successful: " + response2.StatusCode); } if (person == null) output.Text = output.Text + "\r\ |
---|
Console.WriteLine("About to PUT to " + url);
//Load scheme details in to request body
FormUrlEncodedContent content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("PayElement", paymentPayElement.Text),
new KeyValuePair<string, string>("StartDate", paymentStartDate.Text),
new KeyValuePair<string, string>("EndDate", paymentEndDate.Text),
new KeyValuePair<string, string>("AnnualAmount", annualAmount.Text),
new KeyValuePair<string, string>("PeriodAmount", periodAmount.Text),
new KeyValuePair<string, string>("Balance", balance.Text),
new KeyValuePair<string, string>("RateEffectiveDate", paymentRateEffectiveDate.Text)
});
var requestMessage = new HttpRequestMessage(HttpMethod.Put, url);
requestMessage.Headers.Add("Authorization", "Bearer " + token);
requestMessage.Content = content;
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
HttpResponseMessage response2 = client.PutAsync(url, content).Result;
if (response2.IsSuccessStatusCode)
{
Task<Object> res2 = response2.Content.ReadAsAsync<Object>();Console.WriteLine("Add Payment result: " + res2.Result);
result = res2.Result
nGet Person returned null"; } Console.WriteLine("Get Person returned:" + person.ToString()); } } } Console.WriteLine("Exception in Get Person:" + ex); } |
---|
Add a Payment
private void btnUpdatePayment_Click(object sender, EventArgs e)
{
try
{
Console.WriteLine("Update Payment clicked");
output.Text = "";
var token = Authenticate();
if (String.IsNullOrEmpty(token))
{
private void btnAddPayment_Click(object sender, EventArgs e) try
} output.Text = output.Text + "\r\ nAdd Payment failednAuthenticated: " + response2.StatusCode;output.Text = output token.ToString(); Object result = null; api/Payment/" + response2employeeID. ToString()Text; nDoing PUT to URL: " + response2.ReasonPhrase;} if (result == null) output.Text = output.Text + "\r\nAdd Payment returned null"; } else { Console.WriteLine("Add Payment returned:" + result.ToString()); } } } catch (Exception ex) { Console.WriteLine("Exception in Add Payment:" + ex); } } |
---|
Update a Payment
url; //Load scheme details in to request body { new KeyValuePair<string, string>("PayElement", paymentPayElement.Text), }); var requestMessage = new HttpRequestMessage(HttpMethod.Put, url); HttpResponseMessage response2 = client.PutAsync(url, content).Result; { Task<Object> res2 = response2.Content.ReadAsAsync<Object>(); } else { |
---|
output.Text = output.Text + "\r\nAuthenticated: " + token.ToString();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
string url = restURL.Text + "api/Payment/" + employeeID.Text;
url += "/" + paymentPayElement.Text + "/" + paymentStartDate.Text.Replace("/", "-"
Console.WriteLine("Add Payment was not successful: " + response2.StatusCode); |
---|
Console.WriteLine("About to POST to " + url);
//Load scheme details in to request body
FormUrlEncodedContent content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("PayElement", paymentPayElement.Text),
new KeyValuePair<string, string>("StartDate", paymentStartDate.Text),
new KeyValuePair<string, string>("EndDate", paymentEndDate.Text),
new KeyValuePair<string, string>("AnnualAmount", annualAmount.Text),
new KeyValuePair<string, string>("PeriodAmount", periodAmount.Text),
new KeyValuePair<string, string>("Balance", balance.Text),
new KeyValuePair<string, string>("RateEffectiveDate", paymentRateEffectiveDate.Text)
}
);
HttpResponseMessage response2 = client.PostAsync(url, content).Result;
if (response2.IsSuccessStatusCode)
{
Task<Object> res2 = response2.Content.ReadAsAsync<Object>();
Console.WriteLine("Update Payment result: " + res2.Result);
result = res2.Result;
}
elsenAdd Payment failed: " + response2.ReasonPhrase; } if (result == null) output.Text = output.Text + "\r\nAdd Payment returned null"; } else { Console.WriteLine("Add Payment returned:" + result.ToString()); } } } catch (Exception ex) { Console.WriteLine("Exception in Add Payment:" + ex); } } |
---|
Update a Payment
private void btnUpdatePayment_Click(object sender, EventArgs e) try { Console.WriteLine("Update |
---|
output.Text = output.Text + "\r\nUpdate Payment failed: " + response2.StatusCode;
output.Text = output.Text + "\r\nUpdate Payment failed: " + response2.ToString(
Payment clicked"); |
---|
}
if (result == nullText = ""; if (String.IsNullOrEmpty(token)) output.Text = output.Text + "\r\ |
---|
nAuthentication failed "; } else { |
---|
output.Text = output.Text + " |
---|
\r\ |
---|
nAuthenticated: " + |
---|
token.ToString(); |
---|
}
}
}
catch (Exception ex)
{
Console.WriteLine("Exception in Update Payment:" + ex);
}
}
Delete a Payment
private void btnDeletePayment_Click(object sender, EventArgs e)
{
try
{
Console.WriteLine("Delete Payment clicked");
output.Text = "";
var token = Authenticate();
if (String.IsNullOrEmpty(token))
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); Object result = null; |
---|
}
else
{
output.Text = output.Text + "\r\nAuthenticated: " + token.ToString();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
Object result = null;
string url = restURL.Text + "api/Payment/" + employeeID.Text;
url += "/" + paymentPayElement.Text + "/" + paymentStartDate.Text.Replace("/", "-");
Console.WriteLine("About to DELETE to " + url
nDoing POST to URL: " + url; //Load scheme details in to request body { new KeyValuePair<string, string>("PayElement", paymentPayElement.Text), } ); HttpResponseMessage response2 = client. |
---|
PostAsync(url, content).Result; { Task<Object> res2 = response2.Content.ReadAsAsync<Object>(); |
---|
Update Payment result: " + res2.Result); } else { Console.WriteLine(" |
---|
Update was not successful: " + response2.StatusCode); |
---|
nUpdate Payment failed: " + response2.StatusCode; |
---|
nUpdate Payment failed: " + response2.ToString(); |
---|
nUpdate Payment failed: " + response2.ReasonPhrase; } if (result == null) { output.Text = output.Text + "\r\ |
---|
nUpdate Payment returned null"; } else { Console.WriteLine(" |
---|
Update Payment returned:" + result.ToString()); |
---|
nUpdate Payment returned:" + result.ToString(); } } } catch (Exception ex) { Console.WriteLine("Exception in |
---|
Update Payment:" + ex); } } |
---|
Whilst using the InTime Web Services, some fields have expected values from a range of constants. These are detailed below.
...
Comment
...
Delete a Payment
private void btnDeletePayment_Click(object sender, EventArgs e) { try { Console.WriteLine("Delete Payment clicked"); if (String.IsNullOrEmpty(token)) { output.Text = output.Text + "\r\nAuthentication failed "; } else { output.Text = output.Text + "\r\nAuthenticated: " + token.ToString(); Object result = null; output.Text = output.Text + "\r\nDoing DELETE to URL: " + url; HttpResponseMessage response2 = client.DeleteAsync(url).Result; if (response2.IsSuccessStatusCode) { Task<Object> res2 = response2.Content.ReadAsAsync<Object>(); } else { Console.WriteLine("Delete was not successful: " + response2.StatusCode); } if (result == null) { output.Text = output.Text + "\r\nDelete Payment returned null"; } { Console.WriteLine("Delete Payment returned:" + result.ToString()); } } } catch (Exception ex) { Console.WriteLine("Exception in Delete Payment:" + ex); } } |
---|
Whilst using the InPay Web Services, some fields have expected values from a range of constants. These are detailed below.
Field | Constant | Comment | Notes |
---|---|---|---|
Person | |||
Method | CASH | Cash | This is the method of payment |
CHEQUE | Cheque | ||
BACS | Bacs or payment via other banking software | ||
HoursCategory | A | Up to 15.99 | Required for the FPS submission |
B | 24 - 29.99 | ||
C | 30 hrs or more | ||
D | Other | ||
E | 16 - 23.99 | ||
Worker Pay Type | 1 | Salaried | Not Mandatory |
2 | Grade | ||
3 | Hourly | ||
AbsenceDetail | |||
AbsenceType | 1 | Holiday | |
2 | Sickness | ||
AbsenceExt | 1 | Sickness | |
2 | Maternity | ||
3 | Adoption | ||
4 | Paternity Adoption | ||
5 | Paternity Birth | ||
6 | Paid Leave | ||
7 | Shared Parental Leaver Adoption | ||
8 | Shared Parental Leaver Birth | ||
9 | Parental Bereavement |