820 Payroll Deducted and Other Group Premium Payment for Insurance Products (005010X218)
Employers and sponsors send the 820 to pay health plan premiums and to say which members and periods the payment covers. This is the standard X12 HIPAA 005010 spec, with 15 loops and 41 segment positions, as OpenEDI JSON, an ediFabric C# template and an ediFabric Native model. To change it for a trading partner, customize it in the EDI Spec Builder.
Use the 820 spec in your code
ediFabric .NET
Add the C# template and its common files to your project, or reference the template NuGet package, and read 820 files into TS820 objects. See ediFabric .NET.
ediFabric Native
Map version 005010X218 to the Native model with set_map, then parse 820 files to JSON from Python, Java, C or C#. See Convert between EDI and JSON.
OpenEDI
Select Customize in Spec Builder to copy the spec under your own name, change it for your partner, and parse files against it in EdiNation, ediFabric Native or ediFabric Cloud. Read about OpenEDI.
Generate 820 classes in Python, Java, Node.js, Go, Rust or C
ediFabric Native returns each 820 as JSON, with the property names of the OpenEDI schema. To work with that JSON as typed objects, generate classes from the OpenEDI file in your language and deserialize the JSON into TS820. Serialize the objects back to JSON to build EDI with ediFabric Native. The classes keep the loops, segments, lengths and code lists, but not the EDI data formats, so validate files with ediFabric Native. Read more in Generate a class from OpenEDI.
Python: datamodel-code-generator. Node.js: openapi-typescript. Java, Go, Rust and C: OpenAPI Generator.
For a sample file, the same data as JSON, and code to parse, validate and generate the 820, see the 820 transaction guide.
820 structure
Loops and segments of the standard 820, with their usage and maximum repeats.
| ID | Name | Usage | Max use |
|---|---|---|---|
| ST | Transaction Set Header | Optional | 1 |
| BPR | Financial Information | Mandatory | 1 |
| TRN | Reassociation Trace Number | Mandatory | 1 |
| CUR | Foreign Currency Information | Optional | 1 |
| REF | Premium Receivers Identification Key | Optional | >1 |
| DTM | Process Date | Optional | 1 |
| DTM | Delivery Date | Optional | 1 |
| DTM | Coverage Period | Optional | 1 |
| DTM | Creation Date | Optional | 1 |
| Loop 1000A | Premium Receiver Name | Mandatory | 1 |
| N1 | Premium Receiver Name | Mandatory | 1 |
| N2 | Premium Receiver Additional Name | Optional | 1 |
| N3 | Premium Receiver Address | Optional | 1 |
| N4 | Premium Receiver City State ZIP Code | Optional | 1 |
| RDM | Premium Receiver Remittance Delivery Method | Optional | 1 |
| Loop 1000B | Premium Payer Name | Mandatory | 1 |
| N1 | Premium Payer Name | Mandatory | 1 |
| N2 | Premium Payer Additional Name | Optional | 1 |
| N3 | Premium Payer Address | Optional | 1 |
| N4 | Premium Payer City State ZIP Code | Optional | 1 |
| PER | Premium Payer Administrative Contact | Optional | >1 |
| Loop 1000C | Intermediary Bank Information | Optional | 14 |
| N1 | Intermediary Bank Information | Mandatory | 1 |
| N2 | Intermediary Bank Additional Name | Optional | 1 |
| N3 | Intermediary Bank Address | Optional | 1 |
| N4 | Intermediary Bank City State ZIP Code | Optional | 1 |
| PER | Intermediary Bank Administrative Contact | Optional | >1 |
| Loop 2000A | Organization Summary Remittance | Optional | 1 |
| ENT | Organization Summary Remittance | Mandatory | 1 |
| Loop 2200A | Organization Summary Remittance Level Adjustmentfor Previous Payment | Optional | >1 |
| ADX | Organization Summary Remittance Level Adjustmentfor Previous Payment | Mandatory | 1 |
| Loop 2300A | Organization Summary Remittance Detail | Mandatory | >1 |
| RMR | Organization Summary Remittance Detail | Mandatory | 1 |
| REF | Reference Information | Optional | >1 |
| DTM | Organizational Coverage Period | Optional | 1 |
| Loop 2310A | Summary Line Item | Optional | 1 |
| IT1 | Summary Line Item | Mandatory | 1 |
| Loop 2312A | Service Promotion Allowance Charge Information | Optional | 4 |
| SAC | Service Promotion Allowance Charge Information | Mandatory | 1 |
| Loop 2315A | Member Count | Optional | 3 |
| SLN | Member Count | Mandatory | 1 |
| Loop 2320A | Organization Summary Remittance Level Adjustmentfor Current Payment | Optional | >1 |
| ADX | Organization Summary Remittance Level Adjustmentfor Current Payment | Mandatory | 1 |
| Loop 2000B | Individual Remittance | Optional | 99999999 |
| ENT | Individual Remittance | Mandatory | 1 |
| Loop 2100B | Individual Name | Optional | >1 |
| NM1 | Individual Name | Mandatory | 1 |
| Loop 2200B | Individual Premium Adjustmentfor Previous Payment | Optional | >1 |
| ADX | Individual Premium Adjustmentfor Previous Payment | Mandatory | 1 |
| Loop 2300B | Individual Premium Remittance Detail | Mandatory | >1 |
| RMR | Individual Premium Remittance Detail | Mandatory | 1 |
| REF | Reference Information | Optional | >1 |
| DTM | Individual Coverage Period | Optional | 1 |
| Loop 2320B | Individual Premium Adjustmentfor Current Payment | Optional | >1 |
| ADX | Individual Premium Adjustmentfor Current Payment | Mandatory | 1 |
| SE | Transaction Set Trailer | Optional | 1 |