JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const payment of client.hris.payments.list({
end_date: '2021-01-01',
start_date: '2021-01-01',
})) {
console.log(payment.id);
}from datetime import date
from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.hris.payments.list(
end_date=date.fromisoformat("2021-01-01"),
start_date=date.fromisoformat("2021-01-01"),
)
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"time"
"github.com/Finch-API/finch-api-go/v2"
"github.com/Finch-API/finch-api-go/v2/option"
)
func main() {
client := finchgo.NewClient(
option.WithAccessToken("My Access Token"),
)
page, err := client.HRIS.Payments.List(context.TODO(), finchgo.HRISPaymentListParams{
EndDate: finchgo.F(time.Now()),
StartDate: finchgo.F(time.Now()),
})
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.HrisPaymentListPage;
import com.tryfinch.api.models.HrisPaymentListParams;
import java.time.LocalDate;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
HrisPaymentListParams params = HrisPaymentListParams.builder()
.endDate(LocalDate.parse("2021-01-01"))
.startDate(LocalDate.parse("2021-01-01"))
.build();
HrisPaymentListPage page = client.hris().payments().list(params);
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.HrisPaymentListPage
import com.tryfinch.api.models.HrisPaymentListParams
import java.time.LocalDate
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val params: HrisPaymentListParams = HrisPaymentListParams.builder()
.endDate(LocalDate.parse("2021-01-01"))
.startDate(LocalDate.parse("2021-01-01"))
.build()
val page: HrisPaymentListPage = client.hris().payments().list(params)
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.hris.payments.list(end_date: "2021-01-01", start_date: "2021-01-01")
puts(page)curl --request GET \
--url https://api.tryfinch.com/employer/payment \
--header 'Authorization: Bearer <token>' \
--header 'Finch-API-Version: <finch-api-version>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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;
}[
{
"id": "20aa7cf2-949d-4d4e-9c01-499b59501ded",
"pay_period": {
"start_date": "2019-08-01",
"end_date": "2019-08-15"
},
"pay_date": "2019-08-22",
"debit_date": "2019-08-22",
"company_debit": {
"amount": 5300000,
"currency": "usd"
},
"gross_pay": {
"amount": 4000000,
"currency": "usd"
},
"net_pay": {
"amount": 3200000,
"currency": "usd"
},
"employer_taxes": {
"amount": 200000,
"currency": "usd"
},
"employee_taxes": {
"amount": 350000,
"currency": "usd"
},
"individual_ids": [
"54719e14-5ea7-4fda-9898-f4d9ccb83c1a",
"0ab620fc-203e-44ad-916c-facc69250f6f"
],
"pay_group_ids": [
"5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"9349eed4-4064-4641-ba8e-9e1ad7e1d014"
],
"pay_frequencies": [
"monthly",
"weekly"
]
}
]Payroll
Payment
Read payroll and contractor related payments by the company.
GET
/
employer
/
payment
JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const payment of client.hris.payments.list({
end_date: '2021-01-01',
start_date: '2021-01-01',
})) {
console.log(payment.id);
}from datetime import date
from finch import Finch
client = Finch(
access_token="My Access Token",
)
page = client.hris.payments.list(
end_date=date.fromisoformat("2021-01-01"),
start_date=date.fromisoformat("2021-01-01"),
)
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"time"
"github.com/Finch-API/finch-api-go/v2"
"github.com/Finch-API/finch-api-go/v2/option"
)
func main() {
client := finchgo.NewClient(
option.WithAccessToken("My Access Token"),
)
page, err := client.HRIS.Payments.List(context.TODO(), finchgo.HRISPaymentListParams{
EndDate: finchgo.F(time.Now()),
StartDate: finchgo.F(time.Now()),
})
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.HrisPaymentListPage;
import com.tryfinch.api.models.HrisPaymentListParams;
import java.time.LocalDate;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
HrisPaymentListParams params = HrisPaymentListParams.builder()
.endDate(LocalDate.parse("2021-01-01"))
.startDate(LocalDate.parse("2021-01-01"))
.build();
HrisPaymentListPage page = client.hris().payments().list(params);
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.HrisPaymentListPage
import com.tryfinch.api.models.HrisPaymentListParams
import java.time.LocalDate
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val params: HrisPaymentListParams = HrisPaymentListParams.builder()
.endDate(LocalDate.parse("2021-01-01"))
.startDate(LocalDate.parse("2021-01-01"))
.build()
val page: HrisPaymentListPage = client.hris().payments().list(params)
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
page = finch.hris.payments.list(end_date: "2021-01-01", start_date: "2021-01-01")
puts(page)curl --request GET \
--url https://api.tryfinch.com/employer/payment \
--header 'Authorization: Bearer <token>' \
--header 'Finch-API-Version: <finch-api-version>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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;
}[
{
"id": "20aa7cf2-949d-4d4e-9c01-499b59501ded",
"pay_period": {
"start_date": "2019-08-01",
"end_date": "2019-08-15"
},
"pay_date": "2019-08-22",
"debit_date": "2019-08-22",
"company_debit": {
"amount": 5300000,
"currency": "usd"
},
"gross_pay": {
"amount": 4000000,
"currency": "usd"
},
"net_pay": {
"amount": 3200000,
"currency": "usd"
},
"employer_taxes": {
"amount": 200000,
"currency": "usd"
},
"employee_taxes": {
"amount": 350000,
"currency": "usd"
},
"individual_ids": [
"54719e14-5ea7-4fda-9898-f4d9ccb83c1a",
"0ab620fc-203e-44ad-916c-facc69250f6f"
],
"pay_group_ids": [
"5d0b10a1-a09a-430f-81f1-20be735dc5e9",
"9349eed4-4064-4641-ba8e-9e1ad7e1d014"
],
"pay_frequencies": [
"monthly",
"weekly"
]
}
]Headers
Query Parameters
The entity IDs to specify which entities' data to access. Provide exactly one entity ID per request; a maximum of one is accepted. Required when the connection has more than one entity — omitting it returns a 400 invalid_request_error. Optional for single-entity connections.
Required array length:
1 elementExample:
["550e8400-e29b-41d4-a716-446655440000"]
Response
Payment data
Was this page helpful?