N402 in X12 837P: A Field Guide to State or Province Code
N402 is two characters wide and looks trivial, but it's the field most payer-side edits actually check — because a state code that doesn't match its ZIP code is one of the easiest ways for a claim to bounce before anyone even looks at the clinical content.
N402 is the second element in the N4 segment of an X12 837P claim, carrying the standard two-letter postal abbreviation for the US state (or a comparable code for a Canadian province) tied to the address in that segment.
What populates this field in practice
Example
N402 value CO must correspond to both the city (DENVER) and the ZIP code (80202) that flank it in this synthetic address.
Where this trips people up
Test files often draw N402 from a short rotation of three or four familiar states, which means claim-scrubbing rules that check state/ZIP consistency, or downstream reporting that groups claims by geography, never get exercised against the full range of values a real book of business produces. It's also common to see N402 populated with a full state name instead of the two-letter code when data is generated from a spreadsheet rather than validated against the actual code set, which a strict parser will reject outright.