Pay Stub

Extract earnings, deductions, and net pay information from a payroll stub or pay statement.

The fields this preset extracts.

employerobject

Information about the employer.

namestring

Legal name of the employer.

addressstring

Mailing address of the employer.

instring

Employer Identification Number (IN) as nine digits without dashes.

contact_phonestring

Employer contact phone number.

employeeobject

Information about the employee.

namestring

Full legal name of the employee.

employee_idstring

Employer-assigned employee identification number.

ssn_last_fourstring

Last four digits of the employee's Social Security Number.

addressstring

Mailing address of the employee.

tax_filing_statusstring

Tax filing status for federal withholding purposes.

pay_period_startstring

Start date of the pay period in ISO-8601 format (YYYY-MM-DD).

pay_period_endstring

End date of the pay period in ISO-8601 format (YYYY-MM-DD).

pay_datestring

Date the employee is paid in ISO-8601 format (YYYY-MM-DD).

pay_frequencystring

Frequency of pay (weekly, biweekly, semimonthly, monthly, annual, or other).

earningsarray

Array of earnings components.

pre_tax_deductionsarray

Array of pre-tax deduction components.

taxesarray

Array of tax withholdings.

post_tax_deductionsarray

Array of post-tax deduction components.

gross_pay_currentnumber

Gross pay (total earnings before deductions) for current pay period as a decimal number without currency symbol.

gross_pay_ytdnumber

Year-to-date gross pay as a decimal number without currency symbol.

net_pay_currentnumber

Net pay (take-home pay) for current pay period as a decimal number without currency symbol.

net_pay_ytdnumber

Year-to-date net pay as a decimal number without currency symbol.

currencystring

ISO 4217 currency code (e.g., 'USD', 'EUR', 'GBP').

curl
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.

Open-source primitives, composed into one backend. Curated cohort of design partners. Apply to work with us.

We value your privacy

Xberg uses cookies to improve your experience, personalize content, and analyze traffic. You can manage your preferences at any time.