Historical payrolls are used for companies who transfer from one payroll provider to your payroll product after the start of a year. It’s important to capture their previous payrolls during Company Onboarding to ensure year to date filings are accurate. The video below walks through the Gusto Flows first to give you a visual for each of the steps outlined below. The tutorial for the APIs starts around the 2 minute mark. An employer will need to gather all paystubs for every employee who was paid in the current calendar year. For previous quarters in this calendar year, the employer should gather quarterly payroll summaries for each employee and use these to enter quarter-to-date (“QTD”) information to simplify this step (1 payroll per calendar quarter). These summaries should include any benefits, reimbursements, or exemptions for their employees. Before creating a historical payroll, an employee must be onboarded and State Tax Setup must be complete.Documentation Index
Fetch the complete documentation index at: https://gusto-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Check date vs. Pay period
There is a difference between a check date and the pay period:- The check date is the date the employee was paid. This date determines your payroll tax liability and will be the date you’ll enter when reporting previous payrolls.
- The pay period is the period of time during which the wages were earned. The pay period is defined by a
payment_period_start_dateandpayment_period_end_date.
1. Create an External Payroll
POST v1/companies/{company_uuid}/external_payrolls [endpoint](/embedded-payroll/v2025-11-15/reference/post-v1-external-payrollpost to create the initial shell of the payroll. The response will include a uuid which is the external_payroll_uuid.
2. Update the External Payroll
To be able to update the external payroll, you will need to have the earnings, benefits, and taxes ids. To retrieve these, use theGET companies/{company_uuid}/external_payrolls/{external_payroll_uuid} endpoint.
You can update the external payroll for multiple employees using the PUT companies/{company_uuid}/external_payrolls/{external_payroll_uuid} endpoint. If you would like to PATCH updates you can set the replace_fields value in the endpoint to true.
GET companies/{company_uuid}/external_payrolls/{external_payroll_id}/calculate_taxes endpoint . Note that this will return suggested tax amounts. The calculation is just our guidance.
If you decide to use these suggested tax amounts, you can use these amounts to validate the entries provided by the end user and/or override any taxes entered. You can update the external payroll with these suggested amounts using the PUT companies/{company_uuid}/external_payrolls/{external_payroll_uuid} endpoint.
3. Update Tax Liabilities
Once earnings, benefits and taxes have been entered for all external payrolls and employees, you can retrieve tax liabilities from aggregate external payrolls for a company usingGET v1/companies/{company_uuid}/external_payrolls/tax_liabilities endpoint.
You may change these selections using the same endpoint until you finalize your tax liabilities in step 4. Be sure to update tax liabilities selection to avoid extra tax debit in your account.
The tax liabilities amount is a sum of previous + current liabilities. If multiple payrolls have been added in the previous steps, the taxes from each payroll will compound on each other in order of most recent payroll to least recent. For example, if the first external added had 7, the total will be $12.
If an Employer indicates there are no taxes outstanding ($0.00) for all taxes, Gusto will report all tax amounts as having been paid to the agency. We will still report the total wages (for all payrolls for the year - both outside of Gusto plus amounts paid by Gusto), and all the taxes owed for the year (for all payrolls outside of Gusto and tax amounts for payrolls processed by Gusto), but we won’t debit or pay the taxes again for historical payrolls.Use
PUT v1/companies/{company_uuid}/external_payrolls/tax_liabilities to update tax liabilities accordingly in this scenario.4. Finalize Tax Liabilities
Given the sensitive nature of this information, it is important the Employer reviews the information before completing this step. To finalize the tax liabilities use thePUT companies/{company_uuid}/external_payrolls/tax_liabilities/finish endpoint.
External Payrolls - Processing Time
Note: Submitting this request starts an async process which should take less than 2 minutes to complete. Once completed, the status for external payroll(s) will change from “unprocessed” to “processed”.external: true attribute for each external payroll that gets processed.
Delete an external payroll
External payrolls can be deleted if the tax liabilities have not been finalized yet.If an external is deleted, tax liability amounts will likely change. Be sure to update the tax liabilities selections again after an external is deleted to retrieve the most recent and accurate amounts.Once finalized, the external payroll(s) cannot be changed. To correct an external payroll, please contact Support.Create Company Specific Custom Earnings Pay Schedules