Ledger Items
curl --request POST \
--url https://api.tryfinch.com/employer/ledger-items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"requests": [
{
"payment_id": "string"
}
]
}
'import requests
url = "https://api.tryfinch.com/employer/ledger-items"
payload = { "requests": [{ "payment_id": "string" }] }
headers = {
"Finch-API-Version": "<finch-api-version>",
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Finch-API-Version': '<finch-api-version>',
'Content-Type': '<content-type>',
Authorization: 'Bearer <token>'
},
body: JSON.stringify({requests: [{payment_id: 'string'}]})
};
fetch('https://api.tryfinch.com/employer/ledger-items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/ledger-items",
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' => 'string'
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tryfinch.com/employer/ledger-items"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"payment_id\": \"string\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Finch-API-Version", "<finch-api-version>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tryfinch.com/employer/ledger-items")
.header("Finch-API-Version", "<finch-api-version>")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"requests\": [\n {\n \"payment_id\": \"string\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryfinch.com/employer/ledger-items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Finch-API-Version"] = '<finch-api-version>'
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"requests\": [\n {\n \"payment_id\": \"string\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"responses": [
{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"code": 200,
"body": {
"source": "direct",
"provider_description": null,
"pay_date": "2022-05-20",
"totals": {
"debit": {
"amount": 5463791,
"currency": "usd"
},
"credit": {
"amount": 5463791,
"currency": "usd"
},
"balanced": true
},
"paging": {
"count": 2,
"offset": 0
},
"ledger_items": [
{
"type": "regular_wages",
"account_type": "RegularWages",
"account_description": "Regular Wages",
"debit": {
"amount": 5463791,
"currency": "usd"
},
"credit": {
"amount": 0,
"currency": "usd"
}
},
{
"type": "cash_debit_net_pay",
"account_type": "DebitNetPay",
"account_description": "Employee Payment",
"debit": {
"amount": 0,
"currency": "usd"
},
"credit": {
"amount": 5463791,
"currency": "usd"
}
}
]
}
}
]
}Payroll
Ledger Items
Read the ledger entries for one or more payments.
POST
/
employer
/
ledger-items
Ledger Items
curl --request POST \
--url https://api.tryfinch.com/employer/ledger-items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'Finch-API-Version: <finch-api-version>' \
--data '
{
"requests": [
{
"payment_id": "string"
}
]
}
'import requests
url = "https://api.tryfinch.com/employer/ledger-items"
payload = { "requests": [{ "payment_id": "string" }] }
headers = {
"Finch-API-Version": "<finch-api-version>",
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Finch-API-Version': '<finch-api-version>',
'Content-Type': '<content-type>',
Authorization: 'Bearer <token>'
},
body: JSON.stringify({requests: [{payment_id: 'string'}]})
};
fetch('https://api.tryfinch.com/employer/ledger-items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/employer/ledger-items",
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' => 'string'
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tryfinch.com/employer/ledger-items"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"payment_id\": \"string\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Finch-API-Version", "<finch-api-version>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tryfinch.com/employer/ledger-items")
.header("Finch-API-Version", "<finch-api-version>")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"requests\": [\n {\n \"payment_id\": \"string\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryfinch.com/employer/ledger-items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Finch-API-Version"] = '<finch-api-version>'
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"requests\": [\n {\n \"payment_id\": \"string\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"responses": [
{
"payment_id": "fc8b024e-d373-4c9c-80fc-f1625383d142",
"code": 200,
"body": {
"source": "direct",
"provider_description": null,
"pay_date": "2022-05-20",
"totals": {
"debit": {
"amount": 5463791,
"currency": "usd"
},
"credit": {
"amount": 5463791,
"currency": "usd"
},
"balanced": true
},
"paging": {
"count": 2,
"offset": 0
},
"ledger_items": [
{
"type": "regular_wages",
"account_type": "RegularWages",
"account_description": "Regular Wages",
"debit": {
"amount": 5463791,
"currency": "usd"
},
"credit": {
"amount": 0,
"currency": "usd"
}
},
{
"type": "cash_debit_net_pay",
"account_type": "DebitNetPay",
"account_description": "Employee Payment",
"debit": {
"amount": 0,
"currency": "usd"
},
"credit": {
"amount": 5463791,
"currency": "usd"
}
}
]
}
}
]
}Beta — This endpoint is currently available for Gusto only. Endpoint paths and field names may change before general availability.
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. Provide exactly one entity ID per request; a maximum of one is accepted.
Required array length:
1 elementExample:
["550e8400-e29b-41d4-a716-446655440000"]
Body
application/json
One entry per payment you want the ledger for.
Show child attributes
Show child attributes
Response
The ledger for each requested payment.
Show child attributes
Show child attributes
Was this page helpful?
⌘I