> ## Documentation Index
> Fetch the complete documentation index at: https://docs-test.symmetry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Compare two paychecks and explain the differences

> Accepts two PayCalc contexts. Runs both through STE, computes a structured diff, and returns a single AI-generated narrative explaining only the meaningful differences.



## OpenAPI

````yaml /ste/api-reference/stl-api.yaml post /v1/experimental/compare
openapi: 3.1.0
info:
  title: Symmetry Tax Logic API
  description: >-
    NOTE: All `/v1/*` endpoints require a Bearer token.


    **To authenticate:** call `GET /authentication/login` on the Symmetry API
    with your API key in the `api-key` header, then use the returned
    `accessToken` as the Bearer token below.
  contact:
    name: Symmetry Software
    url: https://www.symmetry.com/
    email: support@symmetry.com
  license:
    name: Terms of Use
    url: https://www.symmetry.com/terms
  version: 2026.7.1
servers:
  - url: https://api.symmetry.com/stl
security:
  - BearerAuth: []
tags:
  - name: Symmetry Tax Logic
    description: >-
      Generate AI-powered tax calculation explanations using the Symmetry Tax
      Engine
paths:
  /v1/experimental/compare:
    post:
      tags:
        - Symmetry Tax Logic
      summary: Compare two paychecks and explain the differences
      description: >-
        Accepts two PayCalc contexts. Runs both through STE, computes a
        structured diff, and returns a single AI-generated narrative explaining
        only the meaningful differences.
      operationId: compare_v1_experimental_v1_experimental_compare_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompareInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompareOutput'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CompareInput:
      properties:
        taxIds:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Taxids
          description: >-
            Tax ID(s) to compare. String for single tax, array for multiple (max
            10)
        context_a:
          $ref: '#/components/schemas/PayCalcContext'
          description: First paycheck (earlier payDate becomes 'before')
        context_b:
          $ref: '#/components/schemas/PayCalcContext'
          description: Second paycheck (later payDate becomes 'after')
      type: object
      required:
        - taxIds
        - context_a
        - context_b
      title: CompareInput
      description: >-
        Input for POST /v1/experimental/compare — two PayCalc contexts with 1-10
        tax IDs.
      examples:
        - context_a:
            payCalc:
              employeeID: emp1
              payrollRunParameters:
                payDate: '2026-01-01'
                payPeriodNumber: 1
                payPeriodsPerYear: 52
              taxJurisdictionParms:
                - uniqueTaxID: 00-000-0000-FIT-000
              wages: []
          context_b:
            payCalc:
              employeeID: emp1
              payrollRunParameters:
                payDate: '2026-01-08'
                payPeriodNumber: 2
                payPeriodsPerYear: 52
              taxJurisdictionParms:
                - uniqueTaxID: 00-000-0000-FIT-000
              wages: []
          taxIds: 00-000-0000-FIT-000
        - context_a:
            payCalc:
              employeeID: emp1
              payrollRunParameters:
                payDate: '2026-01-01'
                payPeriodNumber: 1
                payPeriodsPerYear: 52
              taxJurisdictionParms:
                - uniqueTaxID: 00-000-0000-FIT-000
              wages: []
          context_b:
            payCalc:
              employeeID: emp1
              payrollRunParameters:
                payDate: '2026-01-08'
                payPeriodNumber: 2
                payPeriodsPerYear: 52
              taxJurisdictionParms:
                - uniqueTaxID: 00-000-0000-FIT-000
              wages: []
          taxIds:
            - 00-000-0000-FIT-000
            - 00-000-0000-FICA-000
    CompareOutput:
      properties:
        id:
          type: string
          title: Id
          description: Request ID (ULID)
        summary:
          type: string
          title: Summary
          description: Single flowing narrative explaining differences (≤200 words)
        paycheck:
          $ref: '#/components/schemas/Paycheck'
          description: Paycheck-level diff section (gross, net, wages, benefits)
        results:
          items:
            $ref: '#/components/schemas/TaxResult'
          type: array
          title: Results
          description: >-
            Per-tax comparison results — one entry per requested tax that
            resolved in at least one context
        usage:
          anyOf:
            - $ref: '#/components/schemas/TokenUsage'
            - type: 'null'
          description: >-
            Token usage statistics from the Bedrock call (None if the call did
            not complete)
        ai_disclosure:
          type: string
          title: Ai Disclosure
          description: Static AI-generated content disclaimer for client display
          default: >-
            This explanation is generated using AI and is provided for
            informational purposes only. It does not constitute tax, legal, or
            financial advice. AI can make mistakes.
      type: object
      required:
        - id
        - summary
        - paycheck
      title: CompareOutput
      description: Response for POST /v1/experimental/compare.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PayCalcContext:
      properties:
        payCalc:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Paycalc
          description: >-
            Single employee PayCalc object (flat structure - no PayCalcRequest
            wrapper)
        session:
          anyOf:
            - type: string
            - type: 'null'
          title: Session
          description: Base64-encoded STE session string
      type: object
      title: PayCalcContext
      description: |-
        Context containing a single employee's payCalc data OR a session string.

        Provide exactly one of payCalc or session.
    Paycheck:
      properties:
        gross_a:
          type: number
          title: Gross A
          description: Gross on the 'before' paycheck
        gross_b:
          type: number
          title: Gross B
          description: Gross on the 'after' paycheck
        gross_delta:
          type: number
          title: Gross Delta
          description: gross_b - gross_a
        net_a:
          type: number
          title: Net A
          description: Net (take-home) on the 'before' paycheck
        net_b:
          type: number
          title: Net B
          description: Net (take-home) on the 'after' paycheck
        net_delta:
          type: number
          title: Net Delta
          description: net_b - net_a
        pay_frequency_changed:
          type: boolean
          title: Pay Frequency Changed
          description: True when payPeriodsPerYear differs between the two paychecks
          default: false
        jurisdiction_changed:
          type: boolean
          title: Jurisdiction Changed
          description: >-
            True when at least one location code differs between the two
            paychecks
          default: false
        wage_differences:
          items:
            $ref: '#/components/schemas/ItemDelta'
          type: array
          title: Wage Differences
        benefit_differences:
          items:
            $ref: '#/components/schemas/ItemDelta'
          type: array
          title: Benefit Differences
      type: object
      required:
        - gross_a
        - gross_b
        - gross_delta
        - net_a
        - net_b
        - net_delta
      title: Paycheck
      description: >-
        Paycheck-level diff section (gross/net plus item-level wage and benefit
        deltas).
    TaxResult:
      properties:
        taxId:
          type: string
          title: Taxid
          description: The uniqueTaxID this result is for
        amount_a:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount A
          description: Tax amount on the 'before' paycheck
        amount_b:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount B
          description: Tax amount on the 'after' paycheck
        delta:
          anyOf:
            - type: number
            - type: 'null'
          title: Delta
          description: amount_b - amount_a
        category:
          anyOf:
            - $ref: '#/components/schemas/DifferenceCategory'
            - type: 'null'
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
          description: Machine-readable cue describing the cause
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if this tax could not be compared
      type: object
      required:
        - taxId
      title: TaxResult
      description: >-
        Per-tax comparison result. Either populated with diff fields, or with
        `error` for per-tax failures.
    TokenUsage:
      properties:
        input_tokens:
          type: integer
          title: Input Tokens
          description: Number of input tokens sent to the model
        output_tokens:
          type: integer
          title: Output Tokens
          description: Number of output tokens generated by the model
      type: object
      required:
        - input_tokens
        - output_tokens
      title: TokenUsage
      description: Token usage statistics from the LLM invocation.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ItemDelta:
      properties:
        label:
          type: string
          title: Label
          description: Human-readable label (e.g., 'Federal Income Tax')
        id:
          type: string
          title: Id
          description: >-
            Prefixed stable identifier: 'wage:<wageType>' for wages,
            'benefit:<refCode>' for benefits, raw tax-id for taxes.
        amount_a:
          type: number
          title: Amount A
          description: Amount from the 'before' paycheck
        amount_b:
          type: number
          title: Amount B
          description: Amount from the 'after' paycheck
        delta:
          type: number
          title: Delta
          description: amount_b - amount_a
        category:
          $ref: '#/components/schemas/DifferenceCategory'
          description: Classification bucket
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
          description: >-
            Machine-readable cue describing the cause (e.g., 'tax_introduced',
            'rate_increase', 'wage_base_reset').
      type: object
      required:
        - label
        - id
        - amount_a
        - amount_b
        - delta
        - category
      title: ItemDelta
      description: A single surfaced difference between two paychecks.
    DifferenceCategory:
      type: string
      enum:
        - wage_base_tax_limit
        - income_bracket_change
        - wage_amount_change
        - non_standard_wages
        - benefits_change
        - jurisdiction_change
        - new_tax
        - exemption_change
        - withholding_config_change
        - pay_frequency_change
        - tax_year_rollover
        - rate_update
      title: DifferenceCategory
      description: Classification bucket for a paycheck delta.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Obtain a token by calling GET /authentication/login with your Symmetry
        API key in the api-key header. Paste the accessToken value here.

````