ANSI X12 837P - 5010 ST & SE Transaction Set Header & Trailer
May 07, 2026
The ST (Transaction Set Header) and SE (Transaction Set Trailer) segments define the boundaries of a single transaction set within the ANSI X12 837 Professional (5010) healthcare claim file. These segments operate inside the GS/GE functional group envelope and ensure that each claim transaction is properly identified, counted, and validated.
The ST/SE pair is mandatory and appears once for each transaction set. Each ST segment begins a transaction (such as an 837 claim), and the corresponding SE segment closes that transaction. Together, they ensure data integrity by tracking control numbers and segment counts.
While the ST/SE segments define a single transaction set, that transaction can contain multiple claims – not just one. In practice, senders often group claims together within a single transaction set based on shared characteristics such as:
- Payer
- Line of Business
- Claim Type (e.g., Professional vs. Institutional)
- Billing Provider
These groupings help ensure that claims are processed efficiently and routed correctly by clearinghouses and payers.
👉 Example:
- One
ST/SEper payer - One
ST/SEper billing provider
As a result, a single 837 file may contain multiple ST/SE transaction sets, each representing a logical grouping of claims within the same GS/GE functional group.
Sample 837P (5010) – ST / SE Transaction Set Envelope
- ISA*00* *00* *ZZ*SENDERID *ZZ*RECEIVERID *250918*0535*^*00501*000000011*1*P*:~
-
GS*HC*SENDERCODE*RECEIVERCODE*20250918*0535*10022*X*005010X222A1~
- ST*837*0001*005010X222A1~
- ... (claims detail segments) ...
- SE*39*0001~
- IEA*1*000000011~
In this example:
-
ST02 and SE02 both contain the
Transaction Set Control Number (
0001), which must match exactly. This control number should be unique within the specificISA/IEAinterchange, although the same value may be reused in other interchanges. - SE01 indicates the total number of segments within the transaction set, including the ST and SE segments.
- ST01 identifies the transaction type – for 837 Professional, this is always 837.
Reminder: If the control numbers between ST and SE do not match, or if the segment count is incorrect, the transaction set will be rejected—even if the surrounding GS/GE and ISA/IEA envelopes are valid.
HIPAA Guide – 837P [5010]
[Mandatory]
| Segment | Field | Name | Definition | ||||
|---|---|---|---|---|---|---|---|
| ST | 01 | Transaction Set Identifier Code |
Identifies the type of transaction set.
|
||||
| ST | 02 | Transaction Set Control Number | Unique control number assigned by the sender. This value must match SE02. | ||||
| ST | 03 | Implementation Convention Reference |
Identifies the implementation guide version.
|
||||
| SE | 01 | Number of Included Segments | Total number of segments in the transaction set, including ST and SE. | ||||
| SE | 02 | Transaction Set Control Number | Must match ST02 exactly. |
Note: Each transaction set must be fully enclosed by a matching ST/SE pair. If ST02 and SE02 do not match, or if SE01 does not equal the actual segment count, the transaction will fail validation at the transaction level.
We hope you found this article helpful! Please reach out to us with questions/feedback.
Disclaimer:
While every effort is made to keep all information up to date and accurate, all content found on Eclaims.com is intended to be a general information resource and is provided "AS IS". The accuracy of the information is in no way guaranteed. Eclaims.com makes no warranty to the accuracy, completeness or reliability of any content available through the website. Eclaims.com assumes no liability whatsoever for any errors or omissions in any content contained on this website. You are responsible for verifying any information before relying on it.