Pay Stub

Human Resources

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

curl -X POST $XBERG_ENTERPRISE_URL/v1/extract \
  -H "Authorization: Bearer $XBERG_API_KEY" \
  -F file=@your-pay_stub.pdf \
  -F 'preset=pay_stub'
Sample Pay Stub document

Structured fields extracted by this preset

employerobjectrequired

Information about the employer.

namestringrequired

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.

employeeobjectrequired

Information about the employee.

namestringrequired

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_startstringrequired

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

pay_period_endstringrequired

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

pay_datestringrequired

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_currentnumberrequired

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_currentnumberrequired

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.

currencystringrequired

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

Configuration

Call Mode

text_plus_vision

Citations

Enabled

Version

v1

Tags

payrollpay-stubearningsdeductionsemployee
+System Prompt
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. Ensure all required fields are present: employer.name, employee.name, pay_period_start, pay_period_end, pay_date, gross_pay_current, net_pay_current, and currency. Provide citations for all extracted values.

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

Cookies

We value your privacy

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