X12 813 — Electronic Filing of Tax Return Data
The 813 electronically transmits a tax return to a federal, state, or local authority, and may also initiate payment of the declared tax.
Purpose
The 813 carries the elements of a tax return — tax base, tax due, applicable credits — in a structured form that a tax authority (IRS, US state departments of revenue, local jurisdictions) can ingest without re-keying. Typical uses cover sales tax, motor-fuel tax, industry-specific excise (alcohol, tobacco), and certain withholding declarations.
The 813 can also instruct payment of the amount due: when it does, it is followed (or paired) with an 820 that carries the payment order. The tax authority acknowledges receipt via the 151, which echoes the consistency control back.
Envelope structure
The 813 travels in a functional group TF (Tax Filing). Didactic example for
a quarterly sales-tax filing in release 004010:
ISA*00* *00* *ZZ*ACMECORP *ZZ*IRSGATEWAY *260514*0930*U*00401*000000813*0*P*>~
GS*TF*ACMECORP*IRSGATEWAY*20260514*0930*1*X*004010~
ST*813*0001~
BTI*T6*05*47*IRS*20260514*123456789*49*EIN~
DTM*683*20260331~
TIA*5002*125000.00~
TIA*5004*32000.00~
REF*55*Q1-2026~
N1*FR*ACME CORP*24*123456789~
N3*1500 INDUSTRIAL BLVD~
N4*CHICAGO*IL*60601*US~
SE*11*0001~
GE*1*1~
IEA*1*000000813~
The BTI (Beginning Tax Information) identifies the return: tax type code,
transaction code (original, amended, final filing), jurisdiction, date, taxpayer
identifier (EIN or SSN) and its qualifying code. The TIA (Tax Information
and Amount) segments carry the amounts by category (base, tax due, credit…). The
DTM segments give the tax period.
Common segments
- Header —
ST,BTI(Beginning Tax Information),DTM(period). - Filer identification —
N1(FR = Filer, BY = Buyer, RP = Reporting Party) withN3/N4,REFfor additional IDs. - Declared amounts —
TIA(Tax Information and Amount) repeated per category code;REFfor admin codes. - Detail per jurisdiction / category —
FGS(Form Group Sequence) loops for multi-jurisdiction filings. - Summary —
SE.
Common pitfalls
- Jurisdiction-specific tax-type codes: each state (Texas, California…) publishes its own code book for
BTI01; an IRS mapping does not work as-is for a state. - Coupling with the 820: some authorities require both an 813 AND a separate 820; others accept the payment as a side flow — verify the official scheme of the jurisdiction.
- Interchange control number and test/prod flag: authorities reject interchanges marked
T(test) in production and vice versa.
Related transactions
- 151 — Electronic Filing of Tax Return Data Acknowledgment
- 820 — Payment Order/Remittance Advice (settlement)
- 826 — Tax Rate Notification
- X12 — Hub
Documentation
The code 813 and the name Electronic Filing of Tax Return Data are public and listed on x12.org/products/transaction-sets. Jurisdiction-specific schemes (IRS, a state Department of Revenue) are published by that authority under an open US government license and form the implementation reference, alongside the proprietary X12 TR3.