Authentication Header
The Payment Evolution REST API uses standard HTTP authorization header to pass authorization information. The Authorization header has the following form:
Authorization: PE signature = <issued signature token>
The Issued signature token can be retrieved and regenerated through the payroll application. Within the Add-ons section, click the API tab (contact support if unavailable), and enable/generate a token.
Overview
The PaymentEvolution payCalc API calculates Canadian payroll deductions. These are typically referred to as “gross to net” calculations based on a series of inputs.
| URL | /api/v2/calculate |
| Methods supported | POST |
| Description | Allows you to calculate simple payroll deductions for Canada (all provinces and territories) |
| Elements (* = required) | Expected input | description |
| NetPay | true / false | True = value provided in GrossSalary is after taxes False – value provided in GrossSalary is before taxes |
| TD1ProvincialClaim | Numerical digits – no other characters allowed. For example 1234.99 | TD1 exemption amount (province or territory) |
| TD1FederalClaim | Numerical digits – no other characters allowed. For example 1234.99 | TD1 exemption amount (federal) |
| CppExempt | true / false | |
| EiExempt | true / false | |
| TaxExempt | true / false | |
| StandardHours | Numerical digits – no other characters allowed. For example 1234.99 | Number of hours worked per week. Note: typical values are 35, 37.5, 40 |
| PayRateUnit * | H D W M Y | H = hourly rate D = daily rate W = weekly rate M = monthly rate Y = yearly rate |
| PayRate * | Numerical digits – no other characters allowed. For example, 1234.99 | Amount of pay |
| PayPeriodPerYear * | 52 26 12 04 01 24 22 13 10 | 52 = 52 weekly 26 = 26 biweekly 12 = 12 monthly 04 = 4 quarterly 01 = 1 yearly 24 = 24 semi-monthly 22 = 22 pays per year 13 = 13 pays per year 10 = 10 pays per year |
| Province * | 1 through 13 | 1 = Newfoundland 2 = Nova Scotia 3 = Prince Edward Island 4 = New Brunswick 5 = Quebec 6 = Ontario 7 = Manitoba 8 = Saskatchewan 9 = Alberta 10 = British Columbia 11 = Yukon 12 = Northwest Territories 12 = Nunavut |
| PayPeriodEndDate | UTC time | Example 2015-01-31T00:00:00 |
| Type | Pension Salary | Default = Salary |
| CountryCode | 3-digit Country code as per ISO 3166 | Default = CAN Used for Pension Calculations ONLY, treaty rate determined if outside of Canada |
| NR301 | True False | Default = True If true, use treaty rates based on CountryCode, else use default 25% if not CountryCode <> “CAN” |
Sample POST
{
"TD1ProvincialClaim":null,
"TD1FederalClaim":21111,
"CppExempt": false,
"EiExempt": false,
"PayPeriodEndDate": "05/15/2017",
"PayPeriodPerYear": "52",
"PayRate": "100",
"PayRateUnit": "H",
"Province": "6",
"StandardHours": "35",
"TaxExempt": false,
"netPay": false,
"Type": "Salary",
"CountryCode": "CAN",
"NR301": false,
} Sample Response
{
"Earnings": {
"GrossSalary": 3500,
"AdditionalEarnings": 0,
"TotalTaxableIncome": 3500,
"NetAmount": 2107.86
},
"Deductions": {
"FederalTaxDeductions": 713.07,
"ProvincialTaxDeductions": 452.1,
"CppDeductions": 169.92,
"EiDeductions": 57.05,
"TotalDeductions": -1392.14
},
"Remittance": {
"RemitCPPEmployee": 169.92,
"RemitCPPContribution": 169.92,
"RemitTotalCPP": 339.84,
"RemitEIEmployee": 57.05,
"RemitEIContribution": 79.87,
"RemitTotalEI": 136.92,
"TotalEmployeeTax": 1165.17,
"TotalRemittance": 1641.93
},
"TaxCredits": {
"FederalTD1": 21111,
"ProvincialTD1": 10171
}
} Code samples
curl -X POST
https://moja-calc.paymentevolution.com/api/v2/calculate
-H 'accept: application/json'
-H 'authorization: PE signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
-H 'cache-control: no-cache'
-H 'content-type: application/json'
-d '{
"TD1ProvincialClaim":null,
"TD1FederalClaim":21111,
"CppExempt": false,
"EiExempt": false,
"PayPeriodEndDate": "05/15/2017",
"PayPeriodPerYear": "52",
"PayRate": "100",
"PayRateUnit": "H",
"Province": "6",
"StandardHours": "35",
"TaxExempt": false,
"netPay": false,
"Type": "Salary",
"CountryCode": "CAN",
"NR301": false,
}'
At PaymentEvolution, we’re always focused on helping PEI employers stay compliant, informed, and prepared, especially…
In the modern workplace, technology isn't just a tool; it's a core component of employee…
What this two-year exemption means for your business and your payroll Photo by Mark Stebnicki…
We’re reaching out to share an important update that will affect clients using our QuickBooks…
Every November, the same cycle begins across Canada. Business owners tense up. HR pulls out…
Running payroll for the first time can feel like diving into alphabet soup. Between CPP,…