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"
"github.com/Finch-API/finch-api-go/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"
]
}
]Payment
Read payroll and contractor related payments by the company.
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"
"github.com/Finch-API/finch-api-go/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"
]
}
]Authorizations
Please use your Access Token
Headers
Header used to specify the version for a given API request. Current version is 2020-09-17.
([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))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.
1 element["550e8400-e29b-41d4-a716-446655440000"]
The start date to retrieve payments by a company (inclusive) in YYYY-MM-DD format. Filters payments by their pay_date field.
"2021-01-01"
The end date to retrieve payments by a company (inclusive) in YYYY-MM-DD format. Filters payments by their pay_date field.
"2021-01-01"
Response
Payment data
The unique id for the payment.
The pay period object.
Show child attributes
Show child attributes
(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Array of every individual on this payment.
Array of the Finch id (uuidv4) of every pay group associated with this payment.
List of pay frequencies associated with this payment.
annually, bi_weekly, daily, monthly, other, quarterly, semi_annually, semi_monthly, weekly Was this page helpful?