X12 996 — File Transfer
The 996 documents the transfer of a file — often binary or non-EDI — encapsulated in an X12 envelope to cross a VAN or AS2 channel.
Purpose
The 996 acts as an X12 envelope to transport a file that is not a native X12 transaction: PDF, image, custom file, XML file, ZIP archive. It carries filename, size, content type, and the content (often as base64 or pointer URL).
It is used when a VAN or EDI partner requires X12 envelope routing even for non-EDI content (claim attachments, damage report photos, contract scans). Acknowledged by 997.
Envelope structure
The 996 travels within the three X12 envelope levels (ISA/IEA,
GS/GE with functional group FT, and ST/SE).
Didactic example in release 004010:
ISA*00* *00* *ZZ*SENDERCO *ZZ*RECEIVERCO *260514*1900*U*00401*000000996*0*P*>~
GS*FT*SENDERCO*RECEIVERCO*20260514*1900*1*X*004010~
ST*996*0001~
BGN*00*FT-2026-0042*20260514~
REF*ZZ*FILENAME-CLAIM-DOC-2026-0099.PDF~
REF*ZZ*CONTENT-TYPE-APPLICATION-PDF~
REF*ZZ*FILE-SIZE-BYTES-285000~
MSG*BASE64-PAYLOAD-OR-URL-POINTER~
SE*8*0001~
GE*1*1~
IEA*1*000000996~ Common segments
- Header —
ST,BGN. - Metadata —
REF*ZZ(filename),REF*ZZ(MIME content type),REF*ZZ(size in bytes). - Payload —
MSG(base64 inline) orREF*ZZ(URL pointer for hosted file). - Hash —
REF*ZZ(SHA-256) for integrity. - Summary —
SE.
Common pitfalls
- Size vs VAN limits: VANs often impose message size limits (10 MB typical); a 996 exceeding it forces a split, otherwise transfer fails silently.
- Base64 overhead: base64 encoding inflates size by ~33%; an 8 MB file becomes 10.6 MB and may exceed limits.
- Integrity check: without a SHA-256 hash, in-transit corruption is undetectable; always include and verify the hash on receipt.
Related transactions
Documentation
The code 996 and the name File Transfer 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.