Every time you pick up a prescription, a pharmacy claim gets submitted to your insurance. That transaction travels through a system built in the 1990s — a binary, pipe-delimited protocol called NCPDP Telecommunication Standard D.0.
Here's what a pharmacy claim looks like on the wire:
\x1E\x1CAM04\x1CC4197103141\x1CC51\x1CC601\x1CCA01234567890
Those hex characters are segment separators. The spec has over 400 field definitions. Every pharmacy system in the country encodes and decodes this format. Get one byte wrong and the claim gets rejected.
Why it's still like this
The pharmacy claims network is a chain: pharmacy → switch → PBM. Every link speaks NCPDP D.0. Changing the protocol means coordinating thousands of pharmacies, dozens of switches, and hundreds of PBMs simultaneously. Nobody wants to go first.
The switches (Change Healthcare, SS&C, etc.) act as routers. They read the BIN number from the claim and forward it to the right PBM. Connecting to a switch requires:
- A contract and NDA
- VPN or dedicated line connectivity
- NCPDP binary protocol implementation
- Certification testing
- Per-payer field requirement maintenance
This takes 3-6 months and dedicated healthcare engineers.
The API approach
We built Starlight API to sit between developers and this legacy network. You send JSON:
{
"transaction_type": "B1",
"patient": {
"first_name": "JOHN",
"last_name": "SMITH",
"date_of_birth": "19900301"
},
"insurance": {
"bin_number": "999999",
"pcn": "TEST",
"group_id": "GRP999999",
"cardholder_id": "SAMPLE123456"
},
"prescription": {
"product_id": "00000000000",
"quantity_dispensed": "28",
"days_supply": "28"
}
}
And get back:
{
"header": { "responseStatus": "A" },
"pricing": {
"patientPayAmount": 10.00,
"totalAmountPaid": 44.00
},
"message": "CLAIM PAID"
}
Starlight handles the NCPDP encoding, switch routing, and payer sheet management. You get standard REST API semantics — API keys, JSON request/response, meaningful error codes.
What you can build with this
- Pharmacy management systems without switch contracts
- Price transparency tools that show patients their copay before they visit
- Eligibility checkers that verify coverage in real-time
- Discount card programs with programmatic claims submission
- Analytics platforms aggregating claims data
The state of pharmacy tech
The pharmacy software market is massive ($7B+) but technically stagnant. Most systems are built on top of the same legacy protocols from decades ago. The companies building new pharmacy software — telehealth platforms, mail-order pharmacies, pharmacy benefit startups — all hit the same wall: NCPDP integration.
If you're building in healthcare and want to process pharmacy claims without implementing a binary protocol from 1992, check out the docs.
Starlight API is currently in beta with a free sandbox tier.
Top comments (0)