DEV Community

Cover image for Clearinghouse Integration: How Your EHR Actually Gets Paid
Nirmitee.io
Nirmitee.io

Posted on Originally published at nirmitee.io

Clearinghouse Integration: How Your EHR Actually Gets Paid

Four contract questions to settle before writing code, how claim responses really arrive, and where payment posting goes wrong.

Originally published on Nirmitee.io: Clearinghouse Integration for EHR Teams: X12 Claims in Production

Every US healthcare product that bills insurance eventually hits the same wall. The clinical side works: notes are signed, codes are assigned, the charge is calculated. Then someone asks the question that stalls the roadmap for a quarter: how do we actually get paid?

The answer, for almost everyone, is a clearinghouse.

What a clearinghouse does

There are thousands of payers in the US, each with its own enrollment process, connections and rejection habits. Connecting to them one by one is, as the source puts it, not a project but a company. A clearinghouse gives you:

  • One connection instead of thousands of payer relationships.
  • Checks that catch format errors before a payer sees them.
  • Standardized responses, so you write one parser instead of one per payer.
  • Help with the paperwork of payer enrollment.

Four contract questions to answer before writing code

These are commercial questions with hard technical consequences.

  1. Is the account per platform or per clinic? Contracts are typically negotiated per EHR platform. One account submits for many organizations, each identified by its own tax ID inside the claim.
  2. Is the API in your contract, or just file transfer? The right question is not "does the clearinghouse have an API?" but "is the API included in our contract?" The default EHR agreement is very often batch file transfer only.
  3. Are the provider and payer enrolled? Every payer must be enrolled for every provider, and separately for claims, remittance and eligibility. Enrollment takes weeks and is entirely outside engineering's control.
  4. Are your servers on the allowlist? Clearinghouses only accept connections from registered IP addresses. This has a lead time of several days and is the single most common cause of a stalled first sprint. Request it in week one.

A claim is a conversation, not a call

X12 claim lifecycle timeline showing 837P submission followed by 999, 277CA, 276 inquiry, 277 and 835

A claim is a conversation over days. Source: Nirmitee.io

Claims are not one request and one response. Several messages arrive separately, over hours or days:

  • 837: the claim you send.
  • 999: within minutes, whether your file could be read. It says nothing about whether the claim is any good.
  • 277CA: whether the clearinghouse accepted the claim for forwarding. Most format and data-quality rejections show up here.
  • 277: the payer's view: accepted, pending, denied or finalized.
  • 835: the payment, days to weeks later.

There is one catch teams often miss: the 999, 277CA and 835 arrive on their own, but current payer status generally does not. You have to ask for it with a status inquiry (276). The 277 and 277CA are also easy to confuse, which produces problems that are hard to diagnose. The original guide shows how to tell them apart.

Matching replies to claims

Because replies arrive late, out of order and sometimes bundled, matching them back to the right claim is the hardest part of the integration. It must be designed before the first claim goes out. Three rules from the source:

  • Reuse the same control numbers when resending. Otherwise you cannot tell a retry from a duplicate claim.
  • Never edit the payer's data to force a match. Record manual matches separately.
  • Never drop a payment you cannot match. Route it to a review queue. An unmatched payment is money you cannot post.

The money: reading the 835

835 remittance breakdown showing billed charge, allowed amount, insurance paid, patient responsibility and contractual adjustment

How an 835 breaks down a $200 charge. Source: Nirmitee.io

An 835 does not simply say "we paid you X". It breaks the charge down. The source's example:

  • Billed charge: $200, what you asked for.
  • Allowed amount: $150, what your contract permits.
  • Insurance paid: $120.
  • Patient responsibility: $30 (copay, coinsurance, deductible).
  • Contractual adjustment: $50, the difference you agreed to write off.

Each adjustment carries a group code showing who is responsible: contractual, patient, payer-initiated or other. Per the source, this breakdown is where the errors live, and the 835 is the transaction most commonly implemented wrong.

Other details that cause rejections and stalls

  • Provider roles. A claim carries separate billing, rendering, supervising and referring providers. Collapsing them is a reliable way to get rejected.
  • File transfer quirks. Re-uploading the same filename can silently overwrite a file, and outbound folders are often write-only. Always use unique filenames.

The full guide covers the reference architecture and how to retry safely without creating duplicate claims.


Nirmitee.io builds clearinghouse and X12 claims integrations for EHR and healthtech teams, from submission to payment posting. For the transaction details and architecture, read the original: Clearinghouse Integration for EHR Teams on Nirmitee.io.

Dinesh Thorat is Healthtech Growth Partner at Nirmitee.io.

Originally published at nirmitee.io.

Top comments (0)