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.
...
private void btnAddPayment_Click(object sender, EventArgs e) try
} output.Text = output.Text + "\r\nAuthenticated: " + token.ToString(); Object result = null; //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 { Console.WriteLine("Add Payment was not successful: " + response2.StatusCode); } 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 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; //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>(); } else { Console.WriteLine("Update was not successful: " + response2.StatusCode); } if (result == null) { output.Text = output.Text + "\r\nUpdate Payment returned null"; } else { Console.WriteLine("Update Payment returned:" + result.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"); 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 InTime Web Services, some fields have expected values from a range of constants. These are detailed below.
Field | Constant | Comment | Notes |
---|---|---|---|
Client | |||
invoice period | 0 | Weekly | |
1 | Two-Weekly | ||
2 | Four-Weekly | ||
3 | Calendar Monthly | ||
4 | 4-4-5 | ||
Worker | |||
workerType | paye | For PAYE Workers | |
ltd | For Ltd Company Workers | ||
external-contractor | For Non Ltd Company Workers | ||
cis | For CIS Workers | ||
umb | For Workers operating through an Umbrella | You must specify the umbrella against the worker, otherwise the worker will appear as LTD. | |
cisBusinessType | SoleTrader | ||
Company | |||
Trust | |||
Partnership | |||
cisPercentage | 0 | ||
20 | |||
30 | |||
paymentFrequency | weekly | ||
monthly | |||
<InPay Payroll Name> | If InPay connected, for PAYE workers, use the InPay Payroll Name | ||
timesheetsOnInvoices | 0 | Timesheets On Invoices | |
1 | Timesheets Not On Invoices | ||
paperOnInvoices | -1 | Agency Default | |
0 | No Attachments | ||
1 | Attach Paper Timesheets | ||
2 | Attach Expense Group Paper | ||
4 | Attach Expense Receipts Paper | ||
<sum of the above> | Attach the appropriate paper | For example, 5 to attach timesheets and receipts | |
gender | M | ||
F | |||
U | Unkown | ||
LTD invoice period | 0 | Weekly | |
1 | Two-Weekly | ||
2 | Four-Weekly | ||
3 | Calendar Monthly | ||
4 | 4-4-5 | ||
Payment Method | bacs | ||
cheque | |||
cash | |||
chaps | |||
ach | |||
international | |||
building society | |||
Placement | |||
layout | standard | See Maintaining Placements | |
calendar | |||
timesheetDateCalculator | weekly | See Maintaining Placements. You can see all possible values for this in the ui. | |
monthly | |||
<many more> | See UI for all options. | ||
Rates | |||
period | 60 | For hourly rates entered in hours format (hours only or start, break, finish). | |
1440 | For fixed rates of a specified duration entered in decimal format (decimal or tickbox) | ||
periodDuration | <any integer> | The duration in minutes for the fixed rate (e.g. 60 for hours, 480 for a day). | |
timePattern | default | Will use the selected default time pattern | |
<any string> | The string should match the name of a time pattern in the system | ||
timesheetFields | START_FINISH_BREAK | Enter start, break, finish | Only when period above is 60 |
HOURS | Enter hours only | Only when period above is 60 | |
DECIMAL | Enter time as a decimal | Only when period above is 1440 | |
DAY | Tickbox only (equivalent to entering decimals as 1.00) | Only when period above is 1440 |