ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

X12 158 — Tax Jurisdiction Sourcing

The 158 carries tax-jurisdiction sourcing for a commercial transaction: FIPS code, applicable rate, validity period.

Purpose

The 158 documents the multi-jurisdictional tax sourcing decision for a sale: which jurisdiction (state, county, city, special district) the tax is attributed to, and at what rate. It is used by tax engines such as Vertex or Avalara, and by local tax authorities for multi-jurisdiction reporting.

It is a lookup-style reference transaction, not an event transaction: typically used in response to an information request or to synchronize an internal code list. It complements the 813 (Tax Return Data) which carries the return itself.

Envelope structure

The 158 travels within the three X12 envelope levels (ISA/IEA, GS/GE with functional group TJ, and ST/SE). Didactic example in release 004010:

x12 example-158.x12
ISA*00*          *00*          *ZZ*VERTEX        *ZZ*ACMERETAIL    *260514*1015*U*00401*000000158*0*P*>~
GS*TJ*VERTEX*ACMERETAIL*20260514*1015*1*X*004010~
ST*158*0001~
BGN*00*TJ-2026-0042*20260514~
N1*PR*VERTEX INC*92*VRTX~
N1*PE*ACME RETAIL CO*92*0001~
LX*1~
N4*COLUMBUS*OH*43215*US*CY*39049~
DTM*007*20260101~
DTM*036*20261231~
AMT*TX*0.0725~
REF*ZZ*FIPS-39049-COLUMBUS~
SE*10*0001~
GE*1*1~
IEA*1*000000158~

Common segments

  • HeaderST, BGN, DTM.
  • PartiesN1*PR (Provider = tax engine), N1*PE (Payee = retailer).
  • JurisdictionLX loop with N4 (City / State / ZIP / Country / FIPS code), DTM (validity), AMT*TX (rate), REF (FIPS identifier).
  • SummarySE.

Common pitfalls

  • FIPS vs ZIP: N4 must carry the county FIPS code (element 8), not just the ZIP — one ZIP can span multiple counties and therefore multiple rates.
  • Validity period: encode DTM*007 (effective from) and DTM*036 (effective to); a rate without a validity range cannot be archived cleanly by the tax engine.
  • Special districts: transit, school, fire districts add to the rate; do not roll them into a single AMT*TX, but split into separate LX lines per authority.

Documentation

The code 158 and the name Tax Jurisdiction Sourcing are public and listed on x12.org/products/transaction-sets. The complete structure of loops, qualifiers and code lists is distributed by DISA via the proprietary Implementation Guides (TR3). ediverse.io covers only public concepts, the envelope and didactic examples.