curl --request POST \
--url https://api.example.com/v1/payroll/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"scheme": "<string>",
"year": 2025,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee": {
"id": "<string>",
"daily_salary": 800,
"monthly_salary": 1,
"factor_integracion": 1.0493,
"risk_class_rate": 0.00543,
"overtime_amount": "0",
"sunday_bonus_days": 0,
"grocery_voucher_amount": "0",
"infonavit_credit_amount": "0",
"num_dependentes_irrf": 0,
"vale_transporte_amount": "0",
"pensao_alimenticia_amount": "0",
"decimo_terceiro_amount": "0",
"ferias_amount": "0",
"rat_fap_rate": "0.02",
"cantidad_hijos": 0,
"cantidad_hijos_incapacitados": 0,
"cuota_sindical_rate": "0",
"overrides": {}
},
"employer": {
"id": "<string>",
"rfc": "ABC123456XY0"
},
"overrides": {},
"options": {
"include_audit_trail": true,
"include_diagram": false,
"precision": 2
}
}
'import requests
url = "https://api.example.com/v1/payroll/calculate"
payload = {
"country": "<string>",
"scheme": "<string>",
"year": 2025,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee": {
"id": "<string>",
"daily_salary": 800,
"monthly_salary": 1,
"factor_integracion": 1.0493,
"risk_class_rate": 0.00543,
"overtime_amount": "0",
"sunday_bonus_days": 0,
"grocery_voucher_amount": "0",
"infonavit_credit_amount": "0",
"num_dependentes_irrf": 0,
"vale_transporte_amount": "0",
"pensao_alimenticia_amount": "0",
"decimo_terceiro_amount": "0",
"ferias_amount": "0",
"rat_fap_rate": "0.02",
"cantidad_hijos": 0,
"cantidad_hijos_incapacitados": 0,
"cuota_sindical_rate": "0",
"overrides": {}
},
"employer": {
"id": "<string>",
"rfc": "ABC123456XY0"
},
"overrides": {},
"options": {
"include_audit_trail": True,
"include_diagram": False,
"precision": 2
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: '<string>',
scheme: '<string>',
year: 2025,
period: {start_date: '2023-12-25', end_date: '2023-12-25', days: 16},
employee: {
id: '<string>',
daily_salary: 800,
monthly_salary: 1,
factor_integracion: 1.0493,
risk_class_rate: 0.00543,
overtime_amount: '0',
sunday_bonus_days: 0,
grocery_voucher_amount: '0',
infonavit_credit_amount: '0',
num_dependentes_irrf: 0,
vale_transporte_amount: '0',
pensao_alimenticia_amount: '0',
decimo_terceiro_amount: '0',
ferias_amount: '0',
rat_fap_rate: '0.02',
cantidad_hijos: 0,
cantidad_hijos_incapacitados: 0,
cuota_sindical_rate: '0',
overrides: {}
},
employer: {id: '<string>', rfc: 'ABC123456XY0'},
overrides: {},
options: {include_audit_trail: true, include_diagram: false, precision: 2}
})
};
fetch('https://api.example.com/v1/payroll/calculate', 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.example.com/v1/payroll/calculate",
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([
'country' => '<string>',
'scheme' => '<string>',
'year' => 2025,
'period' => [
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'days' => 16
],
'employee' => [
'id' => '<string>',
'daily_salary' => 800,
'monthly_salary' => 1,
'factor_integracion' => 1.0493,
'risk_class_rate' => 0.00543,
'overtime_amount' => '0',
'sunday_bonus_days' => 0,
'grocery_voucher_amount' => '0',
'infonavit_credit_amount' => '0',
'num_dependentes_irrf' => 0,
'vale_transporte_amount' => '0',
'pensao_alimenticia_amount' => '0',
'decimo_terceiro_amount' => '0',
'ferias_amount' => '0',
'rat_fap_rate' => '0.02',
'cantidad_hijos' => 0,
'cantidad_hijos_incapacitados' => 0,
'cuota_sindical_rate' => '0',
'overrides' => [
]
],
'employer' => [
'id' => '<string>',
'rfc' => 'ABC123456XY0'
],
'overrides' => [
],
'options' => [
'include_audit_trail' => true,
'include_diagram' => false,
'precision' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.example.com/v1/payroll/calculate"
payload := strings.NewReader("{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"overrides\": {},\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.example.com/v1/payroll/calculate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"overrides\": {},\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payroll/calculate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"overrides\": {},\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"country": "<string>",
"scheme": "<string>",
"year": 123,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee_id": "<string>",
"summary": {
"gross_salary": "<string>",
"total_perceptions": "<string>",
"total_deductions": "<string>",
"net_salary": "<string>",
"employer_contributions_total": "<string>",
"employer_total_cost": "<string>"
},
"perceptions": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"taxable": true,
"imss_base": true,
"tags": [
"<string>"
]
}
],
"deductions": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"tags": [
"<string>"
],
"bracket_applied": {}
}
],
"taxable_bases": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"formula": "<string>"
}
],
"employer_contributions": [
{
"table_id": "<string>",
"label": "<string>",
"total": "<string>",
"components": [
{
"id": "<string>",
"label": "<string>",
"base": "<string>",
"rate": "<string>",
"amount": "<string>"
}
]
}
],
"dsl_version": "<string>",
"computed_at": "2023-11-07T05:31:56Z",
"status": "success",
"audit_trail": [
{}
]
}Calculate payroll for a single employee
Calculate a complete payroll breakdown for one employee.
Returns the full set of perceptions (earnings), deductions, taxable bases, employer contributions, and a configurable audit trail.
Monetary values are returned as JSON strings to prevent floating-point
precision issues. Parse with your language’s Decimal type before arithmetic.
Audit trail is included by default (options.include_audit_trail=true).
For high-frequency integrations where you only need the summary, set it to
false to reduce response payload.
curl --request POST \
--url https://api.example.com/v1/payroll/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "<string>",
"scheme": "<string>",
"year": 2025,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee": {
"id": "<string>",
"daily_salary": 800,
"monthly_salary": 1,
"factor_integracion": 1.0493,
"risk_class_rate": 0.00543,
"overtime_amount": "0",
"sunday_bonus_days": 0,
"grocery_voucher_amount": "0",
"infonavit_credit_amount": "0",
"num_dependentes_irrf": 0,
"vale_transporte_amount": "0",
"pensao_alimenticia_amount": "0",
"decimo_terceiro_amount": "0",
"ferias_amount": "0",
"rat_fap_rate": "0.02",
"cantidad_hijos": 0,
"cantidad_hijos_incapacitados": 0,
"cuota_sindical_rate": "0",
"overrides": {}
},
"employer": {
"id": "<string>",
"rfc": "ABC123456XY0"
},
"overrides": {},
"options": {
"include_audit_trail": true,
"include_diagram": false,
"precision": 2
}
}
'import requests
url = "https://api.example.com/v1/payroll/calculate"
payload = {
"country": "<string>",
"scheme": "<string>",
"year": 2025,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee": {
"id": "<string>",
"daily_salary": 800,
"monthly_salary": 1,
"factor_integracion": 1.0493,
"risk_class_rate": 0.00543,
"overtime_amount": "0",
"sunday_bonus_days": 0,
"grocery_voucher_amount": "0",
"infonavit_credit_amount": "0",
"num_dependentes_irrf": 0,
"vale_transporte_amount": "0",
"pensao_alimenticia_amount": "0",
"decimo_terceiro_amount": "0",
"ferias_amount": "0",
"rat_fap_rate": "0.02",
"cantidad_hijos": 0,
"cantidad_hijos_incapacitados": 0,
"cuota_sindical_rate": "0",
"overrides": {}
},
"employer": {
"id": "<string>",
"rfc": "ABC123456XY0"
},
"overrides": {},
"options": {
"include_audit_trail": True,
"include_diagram": False,
"precision": 2
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
country: '<string>',
scheme: '<string>',
year: 2025,
period: {start_date: '2023-12-25', end_date: '2023-12-25', days: 16},
employee: {
id: '<string>',
daily_salary: 800,
monthly_salary: 1,
factor_integracion: 1.0493,
risk_class_rate: 0.00543,
overtime_amount: '0',
sunday_bonus_days: 0,
grocery_voucher_amount: '0',
infonavit_credit_amount: '0',
num_dependentes_irrf: 0,
vale_transporte_amount: '0',
pensao_alimenticia_amount: '0',
decimo_terceiro_amount: '0',
ferias_amount: '0',
rat_fap_rate: '0.02',
cantidad_hijos: 0,
cantidad_hijos_incapacitados: 0,
cuota_sindical_rate: '0',
overrides: {}
},
employer: {id: '<string>', rfc: 'ABC123456XY0'},
overrides: {},
options: {include_audit_trail: true, include_diagram: false, precision: 2}
})
};
fetch('https://api.example.com/v1/payroll/calculate', 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.example.com/v1/payroll/calculate",
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([
'country' => '<string>',
'scheme' => '<string>',
'year' => 2025,
'period' => [
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'days' => 16
],
'employee' => [
'id' => '<string>',
'daily_salary' => 800,
'monthly_salary' => 1,
'factor_integracion' => 1.0493,
'risk_class_rate' => 0.00543,
'overtime_amount' => '0',
'sunday_bonus_days' => 0,
'grocery_voucher_amount' => '0',
'infonavit_credit_amount' => '0',
'num_dependentes_irrf' => 0,
'vale_transporte_amount' => '0',
'pensao_alimenticia_amount' => '0',
'decimo_terceiro_amount' => '0',
'ferias_amount' => '0',
'rat_fap_rate' => '0.02',
'cantidad_hijos' => 0,
'cantidad_hijos_incapacitados' => 0,
'cuota_sindical_rate' => '0',
'overrides' => [
]
],
'employer' => [
'id' => '<string>',
'rfc' => 'ABC123456XY0'
],
'overrides' => [
],
'options' => [
'include_audit_trail' => true,
'include_diagram' => false,
'precision' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.example.com/v1/payroll/calculate"
payload := strings.NewReader("{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"overrides\": {},\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.example.com/v1/payroll/calculate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"overrides\": {},\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payroll/calculate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"country\": \"<string>\",\n \"scheme\": \"<string>\",\n \"year\": 2025,\n \"period\": {\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\",\n \"days\": 16\n },\n \"employee\": {\n \"id\": \"<string>\",\n \"daily_salary\": 800,\n \"monthly_salary\": 1,\n \"factor_integracion\": 1.0493,\n \"risk_class_rate\": 0.00543,\n \"overtime_amount\": \"0\",\n \"sunday_bonus_days\": 0,\n \"grocery_voucher_amount\": \"0\",\n \"infonavit_credit_amount\": \"0\",\n \"num_dependentes_irrf\": 0,\n \"vale_transporte_amount\": \"0\",\n \"pensao_alimenticia_amount\": \"0\",\n \"decimo_terceiro_amount\": \"0\",\n \"ferias_amount\": \"0\",\n \"rat_fap_rate\": \"0.02\",\n \"cantidad_hijos\": 0,\n \"cantidad_hijos_incapacitados\": 0,\n \"cuota_sindical_rate\": \"0\",\n \"overrides\": {}\n },\n \"employer\": {\n \"id\": \"<string>\",\n \"rfc\": \"ABC123456XY0\"\n },\n \"overrides\": {},\n \"options\": {\n \"include_audit_trail\": true,\n \"include_diagram\": false,\n \"precision\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"country": "<string>",
"scheme": "<string>",
"year": 123,
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"days": 16
},
"employee_id": "<string>",
"summary": {
"gross_salary": "<string>",
"total_perceptions": "<string>",
"total_deductions": "<string>",
"net_salary": "<string>",
"employer_contributions_total": "<string>",
"employer_total_cost": "<string>"
},
"perceptions": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"taxable": true,
"imss_base": true,
"tags": [
"<string>"
]
}
],
"deductions": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"tags": [
"<string>"
],
"bracket_applied": {}
}
],
"taxable_bases": [
{
"id": "<string>",
"label": "<string>",
"amount": "<string>",
"formula": "<string>"
}
],
"employer_contributions": [
{
"table_id": "<string>",
"label": "<string>",
"total": "<string>",
"components": [
{
"id": "<string>",
"label": "<string>",
"base": "<string>",
"rate": "<string>",
"amount": "<string>"
}
]
}
],
"dsl_version": "<string>",
"computed_at": "2023-11-07T05:31:56Z",
"status": "success",
"audit_trail": [
{}
]
}Authorizations
API key authentication. Send your API key as: Authorization: Bearer <your_api_key>
Body
Request body for POST /v1/payroll/calculate.
Calculates payroll for a single employee. The most common endpoint — used for payroll runs, payslip generation, and ad-hoc queries.
ISO 3166-1 alpha-2 country code (uppercase).
^[A-Z]{2}$"MX"
Payroll scheme identifier (lowercase). Use GET /v1/payroll/schemes/{country} to list available schemes.
"ordinario"
Calendar year for the payroll calculation.
2020 <= x <= 20302024
Payroll period definition.
Show child attributes
Show child attributes
Employee-side inputs for a payroll calculation.
Show child attributes
Show child attributes
Employer-side inputs for a payroll calculation.
Show child attributes
Show child attributes
Request-level overrides. Merged with employee.overrides. Request-level values take precedence.
Response options. Do not affect the calculation result.
Show child attributes
Show child attributes
Response
Calculation successful.
Full single-employee payroll calculation result.
All monetary values are JSON strings. Parse with your language's Decimal library before doing any arithmetic.
Globally unique calculation ID (ULID). Stable and sortable by time.
"01HX9B2KM3V4W5X6Y7Z8A9B0CD"
Payroll period definition.
Show child attributes
Show child attributes
Employee ID echoed from the request.
High-level financial summary of the payroll calculation.
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
Version string of the DSL rule set used for this calculation.
"2024.2"
UTC timestamp when this calculation was performed.
"success"Step-by-step calculation trace. Each step shows the formula, resolved inputs, and result. Null when include_audit_trail=false.