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.
API key authentication. Send your API key as: Authorization: Bearer <your_api_key>
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.
Employee-side inputs for a payroll calculation.
Employer-side inputs for a payroll calculation.
Request-level overrides. Merged with employee.overrides. Request-level values take precedence.
Response options. Do not affect the calculation result.
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.
Employee ID echoed from the request.
High-level financial summary of the payroll calculation.
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.