import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const payStatementResponse of client.hris.payStatements.retrieveMany({
requests: [{ payment_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],
})) {
console.log(payStatementResponse.payment_id);
}{
"responses": [
{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"code": 200,
"body": {
"paging": {
"count": 25,
"offset": 10
},
"pay_statements": [
{
"individual_id": "be7b048c-a6f3-4194-a017-2f537d4f3565",
"type": "regular_payroll",
"payment_method": "check",
"total_hours": 42.5,
"gross_pay": {
"amount": 230000,
"currency": "usd"
},
"net_pay": {
"amount": 180000,
"currency": "usd"
},
"earnings": [
{
"type": "salary",
"name": "Salary",
"amount": 230000,
"currency": "usd",
"hours": 42.5
}
],
"taxes": [
{
"type": "state",
"name": "State Withholding - OR",
"employer": false,
"amount": 0,
"currency": "usd"
}
],
"employee_deductions": [
{
"name": "Pre-Tax 401k",
"amount": 50000,
"currency": "usd",
"pre_tax": true,
"type": "401k"
}
],
"employer_contributions": [
{
"name": "Employee Medical Insurance",
"amount": 23272,
"currency": "usd",
"type": "s125_medical"
}
]
}
]
}
}
]
}Read detailed pay statements for each individual.
Deduction and contribution types are supported by the payroll systems that supports Benefits.
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const payStatementResponse of client.hris.payStatements.retrieveMany({
requests: [{ payment_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],
})) {
console.log(payStatementResponse.payment_id);
}{
"responses": [
{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"code": 200,
"body": {
"paging": {
"count": 25,
"offset": 10
},
"pay_statements": [
{
"individual_id": "be7b048c-a6f3-4194-a017-2f537d4f3565",
"type": "regular_payroll",
"payment_method": "check",
"total_hours": 42.5,
"gross_pay": {
"amount": 230000,
"currency": "usd"
},
"net_pay": {
"amount": 180000,
"currency": "usd"
},
"earnings": [
{
"type": "salary",
"name": "Salary",
"amount": 230000,
"currency": "usd",
"hours": 42.5
}
],
"taxes": [
{
"type": "state",
"name": "State Withholding - OR",
"employer": false,
"amount": 0,
"currency": "usd"
}
],
"employee_deductions": [
{
"name": "Pre-Tax 401k",
"amount": 50000,
"currency": "usd",
"pre_tax": true,
"type": "401k"
}
],
"employer_contributions": [
{
"name": "Employee Medical Insurance",
"amount": 23272,
"currency": "usd",
"type": "s125_medical"
}
]
}
]
}
}
]
}Please use your Access Token
Header used to specify the version for a given API request. Current version is 2020-09-17.
Used to indicate the original media type of the resource
The entity IDs to specify which entities' data to access.
1 element["550e8400-e29b-41d4-a716-446655440000"]Pay statement data
Show child attributes
Show child attributes
Show child attributes
A stable Finch id (UUID v4) for an individual in the company
The type of the payment associated with the pay statement.
off_cycle_payroll, one_time_payment, regular_payroll, The payment method.
check, direct_deposit, other, The number of hours worked for this pay period
The array of earnings objects associated with this pay statement
Show child attributes
The type of earning.
salary, wage, reimbursement, overtime, severance, double_overtime, pto, sick, bonus, commission, tips, 1099, other, The exact name of the deduction from the pay statement.
The earnings amount in cents.
The earnings currency code.
The number of hours associated with this earning. (For salaried employees, this could be hours per pay period, 0 or null, depending on the provider).
Show child attributes
The metadata to be attached to the entity by existing rules. It is a key-value pairs where the values can be of any type (string, number, boolean, object, array, etc.).
Show child attributes
The array of taxes objects associated with this pay statement.
Show child attributes
The type of taxes.
state, federal, local, fica, The exact name of tax from the pay statement.
true if the amount is paid by the employers.
The currency code.
The tax amount in cents.
Show child attributes
The metadata to be attached to the entity by existing rules. It is a key-value pairs where the values can be of any type (string, number, boolean, object, array, etc.).
Show child attributes
The array of deductions objects associated with this pay statement.
Show child attributes
The deduction name from the pay statement.
The deduction amount in cents.
The deduction currency.
Boolean indicating if the deduction is pre-tax.
Type of benefit.
457, 401k, 401k_roth, 401k_loan, 403b, 403b_roth, 457_roth, commuter, custom_post_tax, custom_pre_tax, fsa_dependent_care, fsa_medical, hsa_post, hsa_pre, s125_dental, s125_medical, s125_vision, simple, simple_ira, Show child attributes
The metadata to be attached to the entity by existing rules. It is a key-value pairs where the values can be of any type (string, number, boolean, object, array, etc.).
Show child attributes
Show child attributes
The contribution name from the pay statement.
The contribution currency.
Type of benefit.
457, 401k, 401k_roth, 401k_loan, 403b, 403b_roth, 457_roth, commuter, custom_post_tax, custom_pre_tax, fsa_dependent_care, fsa_medical, hsa_post, hsa_pre, s125_dental, s125_medical, s125_vision, simple, simple_ira, The contribution amount in cents.
Show child attributes
The metadata to be attached to the entity by existing rules. It is a key-value pairs where the values can be of any type (string, number, boolean, object, array, etc.).
Show child attributes
Was this page helpful?