JavaScript
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: 'fc8b024e-d373-4c9c-80fc-f1625383d142',
limit: 100,
offset: 0,
},
],
})) {
console.log(payStatementResponse.payment_id);
}from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.hris.pay_statements.retrieve_many(
requests=[{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"limit": 100,
"offset": 0,
}],
)
page = page.responses[0]
print(page.payment_id)package main
import (
"context"
"fmt"
"github.com/Finch-API/finch-api-go"
"github.com/Finch-API/finch-api-go/option"
)
func main() {
client := finchgo.NewClient(
option.WithAccessToken("My Access Token"),
)
page, err := client.HRIS.PayStatements.GetMany(context.TODO(), finchgo.HRISPayStatementGetManyParams{
Requests: finchgo.F([]finchgo.HRISPayStatementGetManyParamsRequest{{
PaymentID: finchgo.F("fc8b024e-d373-4c9c-80fc-f1625383d142"),
Limit: finchgo.F(int64(100)),
Offset: finchgo.F(int64(0)),
}}),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.HrisPayStatementRetrieveManyPage;
import com.tryfinch.api.models.HrisPayStatementRetrieveManyParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
HrisPayStatementRetrieveManyParams params = HrisPayStatementRetrieveManyParams.builder()
.addRequest(HrisPayStatementRetrieveManyParams.Request.builder()
.paymentId("fc8b024e-d373-4c9c-80fc-f1625383d142")
.build())
.build();
HrisPayStatementRetrieveManyPage page = client.hris().payStatements().retrieveMany(params);
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.HrisPayStatementRetrieveManyPage
import com.tryfinch.api.models.HrisPayStatementRetrieveManyParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val params: HrisPayStatementRetrieveManyParams = HrisPayStatementRetrieveManyParams.builder()
.addRequest(HrisPayStatementRetrieveManyParams.Request.builder()
.paymentId("fc8b024e-d373-4c9c-80fc-f1625383d142")
.build())
.build()
val page: HrisPayStatementRetrieveManyPage = client.hris().payStatements().retrieveMany(params)
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.hris.pay_statements.retrieve_many(requests: [{payment_id: "fc8b024e-d373-4c9c-80fc-f1625383d142"}])
puts(page)curl --request POST \
--url https://api.tryfinch.com/employer/pay-statement \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"requests": [
{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"limit": 100,
"offset": 0
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/pay-statement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requests' => [
[
'payment_id' => 'fc8b024e-d373-4c9c-80fc-f1625383d142',
'limit' => 100,
'offset' => 0
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"Finch-API-Version: <finch-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"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"
}
]
}
]
}
}
]
}Payroll
Pay Statement
Read detailed pay statements for each individual.
Deduction and contribution types are supported by the payroll systems that supports Benefits.
POST
/
employer
/
pay-statement
JavaScript
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: 'fc8b024e-d373-4c9c-80fc-f1625383d142',
limit: 100,
offset: 0,
},
],
})) {
console.log(payStatementResponse.payment_id);
}from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.hris.pay_statements.retrieve_many(
requests=[{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"limit": 100,
"offset": 0,
}],
)
page = page.responses[0]
print(page.payment_id)package main
import (
"context"
"fmt"
"github.com/Finch-API/finch-api-go"
"github.com/Finch-API/finch-api-go/option"
)
func main() {
client := finchgo.NewClient(
option.WithAccessToken("My Access Token"),
)
page, err := client.HRIS.PayStatements.GetMany(context.TODO(), finchgo.HRISPayStatementGetManyParams{
Requests: finchgo.F([]finchgo.HRISPayStatementGetManyParamsRequest{{
PaymentID: finchgo.F("fc8b024e-d373-4c9c-80fc-f1625383d142"),
Limit: finchgo.F(int64(100)),
Offset: finchgo.F(int64(0)),
}}),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.HrisPayStatementRetrieveManyPage;
import com.tryfinch.api.models.HrisPayStatementRetrieveManyParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
HrisPayStatementRetrieveManyParams params = HrisPayStatementRetrieveManyParams.builder()
.addRequest(HrisPayStatementRetrieveManyParams.Request.builder()
.paymentId("fc8b024e-d373-4c9c-80fc-f1625383d142")
.build())
.build();
HrisPayStatementRetrieveManyPage page = client.hris().payStatements().retrieveMany(params);
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.HrisPayStatementRetrieveManyPage
import com.tryfinch.api.models.HrisPayStatementRetrieveManyParams
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val params: HrisPayStatementRetrieveManyParams = HrisPayStatementRetrieveManyParams.builder()
.addRequest(HrisPayStatementRetrieveManyParams.Request.builder()
.paymentId("fc8b024e-d373-4c9c-80fc-f1625383d142")
.build())
.build()
val page: HrisPayStatementRetrieveManyPage = client.hris().payStatements().retrieveMany(params)
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.hris.pay_statements.retrieve_many(requests: [{payment_id: "fc8b024e-d373-4c9c-80fc-f1625383d142"}])
puts(page)curl --request POST \
--url https://api.tryfinch.com/employer/pay-statement \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"requests": [
{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"limit": 100,
"offset": 0
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/pay-statement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requests' => [
[
'payment_id' => 'fc8b024e-d373-4c9c-80fc-f1625383d142',
'limit' => 100,
'offset' => 0
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"Finch-API-Version: <finch-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"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"
}
]
}
]
}
}
]
}Authorizations
Please use your Access Token
Headers
Header used to specify the version for a given API request. Current version is 2020-09-17.
Pattern:
([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))Used to indicate the original media type of the resource
Query Parameters
The entity IDs to specify which entities' data to access.
Required array length:
1 elementExample:
["550e8400-e29b-41d4-a716-446655440000"]
Body
application/json
The array of batch requests. Maximum 10 payment_ids per request.
Required array length:
1 - 10 elementsShow child attributes
Show child attributes
Response
Pay statement data
Show child attributes
Show child attributes
Was this page helpful?
⌘I