# Calculate Payroll (G2N) Source: https://docs.fluxpayroll.ai/api-reference/endpoint/mexico-payroll/calculate POST /api/mexico-payroll/calculate Calculates gross-to-net payroll for an array of employees, including all Mexican taxes (ISR, IMSS, INFONAVIT). Returns detailed breakdown of employee and employer taxes for each employee. Available earnings can be obtained from the [List Earnings](/api-reference/endpoint/mexico-payroll/get-earnings) endpoint. The response includes taxes and social security contributions — see [List Taxes](/api-reference/endpoint/mexico-payroll/get-taxes) and [List Social Security Contributions](/api-reference/endpoint/mexico-payroll/get-contributions) for details. # Calculate Payroll with Derived Earnings Source: https://docs.fluxpayroll.ai/api-reference/endpoint/mexico-payroll/calculate-with-derived-earnings POST /api/mexico-payroll/calculate-with-derived-earnings Calculates gross-to-net payroll by first generating earnings from time entries and compensation, then calculating all Mexican taxes. This endpoint accepts time entries (start/end times per day) and compensation (daily/weekly/monthly/annual) and automatically derives earnings like SALARY, DOUBLE_OVERTIME, and TRIPLE_OVERTIME. Available earnings can be obtained from the [List Earnings](/api-reference/endpoint/mexico-payroll/get-earnings) endpoint. The response includes taxes and social security contributions — see [List Taxes](/api-reference/endpoint/mexico-payroll/get-taxes) and [List Social Security Contributions](/api-reference/endpoint/mexico-payroll/get-contributions) for details. # Generate Earnings Source: https://docs.fluxpayroll.ai/api-reference/endpoint/mexico-payroll/generate-earnings POST /api/mexico-payroll/generate-earnings Generates earnings (SALARY, DOUBLE_OVERTIME, TRIPLE_OVERTIME, SUNDAY_PREMIUM, VACATION_PREMIUM) from time entries and compensation data. This endpoint does NOT calculate taxes — it only returns the generated earnings and calculated daily wage for each employee. Useful for previewing earnings before running full payroll calculations. Available earnings can be obtained from the [List Earnings](/api-reference/endpoint/mexico-payroll/get-earnings) endpoint. # Get Social Security Contributions Source: https://docs.fluxpayroll.ai/api-reference/endpoint/mexico-payroll/get-contributions GET /api/mexico-payroll/contributions Returns a list of all social security contributions for Mexico, including jurisdiction and agency details. Supports optional locale parameter for translated names and descriptions. # Get Available Earnings Source: https://docs.fluxpayroll.ai/api-reference/endpoint/mexico-payroll/get-earnings GET /api/mexico-payroll/earnings Returns a list of all earning types available for Mexico payroll calculations (e.g., SALARY, DOUBLE_OVERTIME, XMAS, VACATION_PREMIUM, etc.). Supports optional locale parameter for translated names and descriptions. # Get Taxes Source: https://docs.fluxpayroll.ai/api-reference/endpoint/mexico-payroll/get-taxes GET /api/mexico-payroll/taxes Returns a list of all taxes for Mexico, including jurisdiction and agency details. Supports optional locale parameter for translated names and descriptions. # G2N API Source: https://docs.fluxpayroll.ai/api-reference/introduction Flux Payroll's gross-to-net API calculates net pay from gross earnings with country-specific taxes and deductions. Currently supports **Mexico** with full ISR, IMSS, INFONAVIT, and state-level payroll tax calculations. ## Mexico Payroll Endpoints Calculate gross-to-net payroll for employees with predefined earnings. Calculate payroll with auto-generated earnings from time entries and compensation. Retrieve all earning types available for Mexico payroll. Retrieve all tax types for Mexico with jurisdiction and agency details. Retrieve all contribution types for Mexico with jurisdiction and agency details. Preview generated earnings from time entries without running tax calculations. View or download the OpenAPI specification file # Welcome to Flux Payroll API! Source: https://docs.fluxpayroll.ai/getting-started/welcome Flux Payroll’s first release focuses on **gross-to-net** — converting gross incomes into accurate net pay with country-specific taxes and deductions. Check out or gross-to-net docs — API documentation