Pay Stub
Extract earnings, deductions, and net pay information from a payroll stub or pay statement.
The fields this preset extracts.
employerobjectInformation about the employer.
namestringLegal name of the employer.
addressstringMailing address of the employer.
instringEmployer Identification Number (IN) as nine digits without dashes.
contact_phonestringEmployer contact phone number.
employeeobjectInformation about the employee.
namestringFull legal name of the employee.
employee_idstringEmployer-assigned employee identification number.
ssn_last_fourstringLast four digits of the employee's Social Security Number.
addressstringMailing address of the employee.
tax_filing_statusstringTax filing status for federal withholding purposes.
pay_period_startstringStart date of the pay period in ISO-8601 format (YYYY-MM-DD).
pay_period_endstringEnd date of the pay period in ISO-8601 format (YYYY-MM-DD).
pay_datestringDate the employee is paid in ISO-8601 format (YYYY-MM-DD).
pay_frequencystringFrequency of pay (weekly, biweekly, semimonthly, monthly, annual, or other).
earningsarrayArray of earnings components.
pre_tax_deductionsarrayArray of pre-tax deduction components.
taxesarrayArray of tax withholdings.
post_tax_deductionsarrayArray of post-tax deduction components.
gross_pay_currentnumberGross pay (total earnings before deductions) for current pay period as a decimal number without currency symbol.
gross_pay_ytdnumberYear-to-date gross pay as a decimal number without currency symbol.
net_pay_currentnumberNet pay (take-home pay) for current pay period as a decimal number without currency symbol.
net_pay_ytdnumberYear-to-date net pay as a decimal number without currency symbol.
currencystringISO 4217 currency code (e.g., 'USD', 'EUR', 'GBP').
curl -X POST 'https://app.staging.xberg.io/v1/extract' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'file=@your-document.pdf' \
--form-string 'options={"preset":"pay_stub"}'- Call mode
- Text and vision
- Citations
- Enabled
- Version
- v1
The instructions Xberg gives the AI model when it extracts this document type.
You are extracting payroll data from a pay stub or pay statement. Extract all fields exactly as shown. Record the employer name, employee name, pay period dates (start and end), and pay date in ISO-8601 format (YYYY-MM-DD). For the employee, extract the full legal name, employee ID, and last four digits of the SSN. Preserve the tax filing status if shown. Record all earnings components (regular, overtime, bonus, commission, holiday, vacation, sick, etc.) with hours/units and rates as decimal numbers. Include earnings for both the current pay period and year-to-date. Record all taxes withheld (federal income, state income, local income, social security, medicare, SUI, SDI) with jurisdiction codes for state/local taxes. Include pre-tax deductions (401k, health insurance, FSA, etc.) and post-tax deductions (charitable, union dues, etc.) with current and YTD amounts. All monetary amounts must be decimal numbers without currency symbols. Dates must be ISO-formatted. Currency code must be the three-letter ISO 4217 code. Provide citations for all extracted values. If the document does not match this preset, return {}. Extract only values supported by the document. Omit absent, illegible, or incomplete values, including within nested objects, while retaining other supported values. Do not infer, guess, supply defaults, or calculate missing values. Omit dates whose complete year, month, and day are not explicit. Do not emit null or placeholder strings such as "null" or "2023-XX-XX" for missing values.