FlexpaFlexpa
Developer PortalGet a DemoTry it yourself

Guides

  • Home
  • Quickstart
  • Claims data guide
  • Financial data guide
  • Parsing FHIR data

Agents

  • Health records for agents
  • Health tools for agentsNew

Network

  • Network guide
  • Endpoint directory
  • CHPL directory

Consent

  • OAuth
  • Patient linking
  • Usage patterns
  • Patient access

Records

  • FHIR API
  • Webhooks
  • DestinationsNew
  • Data Sheet
  • Node SDK
  • SMART Health Links API
  • SMART Health Check-inNew
  • Terminology
  • Claims to clinical

Misc

  • ChangelogNew
  • Support
  • Flexpa OS
  • We're hiring

Real-time Pharmacy Benefit Check (RTPBC) Preview

RTPBC API implementation is in preview. Please contact partnerships@flexpa.com to learn more.

The CARIN Real-time Pharmacy Benefit Check (RTPBC) API enables real-time access to pharmacy benefit information through a standardized FHIR-based API.

Patient-facing applications can query pharmacy benefit managers and health plans for real-time pharmacy benefit information.

CARIN RTPBC exists alongside the provider-focused NCPDP Real-time Prescription Benefit (RTPB) transaction standard. While RTPBC is designed for patient-facing applications, RTPB serves provider workflows. The standards are designed to be complementary and consistent.

#Availability

Flexpa delivers the largest network of payer FHIR endpoints with covered lives across Medicare, Medicare Advantage, ACA, and employer fully-funded plans. Payers supporting Patient Access RTPBC are included in our comprehensive network coverage.

#Recent Updates

  • California AB 2352 requires health plans to provide real-time prescription drug information via standard APIs and Texas SB 622 mandates similar requirements
  • A dedicated HL7 FHIR Connectathon track is scheduled for January 2025 and Flexpa will be a public participant (contact interop@flexpa.com)

#Implementation Notes

  • Partner-limited availability contact us at partnerships@flexpa.com
  • Follows standard Flexpa Consent authorization patterns and SMART on FHIR
  • Enabled by Flexpa's largest network of of FHIR payer APIs
  • Uses FHIR's standard $process-message operation with a FHIR message bundle mirroring the NPCDP transaction format (MessageHeader, Claim, Patient, Coverage, MedicationRequest)
  • Requires POST request with FHIR message bundle

#Request Format

The request is sent as a POST to https://api.flexpa.com/fhir/$process-message with a FHIR Bundle of type "message" containing:

{
  "resourceType": "Bundle",
  "id": "rtpbc-bundle-request-03-w-header",
  "meta": {
    "profile": [
      "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-bundle"
    ]
  },
  "type": "message",
  "timestamp": "2019-11-15T13:10:13-05:00",
  "entry": [
    {
      "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0a",
      "resource": {
        "resourceType": "MessageHeader",
        "id": "rtpbc-messageheader-request-03",
        "meta": {
          "profile": [
            "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-messageheader"
          ]
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: rtpbc-messageheader-request-03</p><p><b>meta</b>: </p><p><b>event</b>: <span title=\"{http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type rtpbc-request}\">RTPBC Request</span></p><h3>Sources</h3><table class=\"grid\"><tr><td>-</td><td><b>Name</b></td><td><b>Endpoint</b></td></tr><tr><td>*</td><td>MyPatientApp</td><td><a href=\"http://example.org/MyPatientApp\">http://example.org/MyPatientApp</a></td></tr></table><p><b>focus</b>: <a href=\"#Claim_rtpbc-claim-03\">See above (Claim/rtpbc-claim-03)</a></p><p><b>definition</b>: <a href=\"http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-request\">http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-request</a></p></div>"
        },
        "eventCoding": {
          "system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
          "code": "rtpbc-request",
          "display": "RTPBC Request"
        },
        "source": {
          "name": "MyPatientApp",
          "endpoint": "http://example.org/MyPatientApp"
        },
        "focus": [
          {
            "reference": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0b"
          }
        ],
        "definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-request"
      }
    },
    {
      "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0b",
      "resource": {
        "resourceType": "Claim",
        "id": "rtpbc-claim-03",
        "meta": {
          "profile": [
            "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-claim"
          ]
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: rtpbc-claim-03</p><p><b>meta</b>: </p><p><b>identifier</b>: id: rtpbc-03</p><p><b>status</b>: active</p><p><b>type</b>: <span title=\"Codes: {http://terminology.hl7.org/CodeSystem/claim-type pharmacy}\">Pharmacy</span></p><p><b>use</b>: predetermination</p><p><b>patient</b>: <a href=\"#Patient_rtpbc-patient-03\">See above (Patient/rtpbc-patient-03)</a></p><p><b>created</b>: Nov 1, 2019 4:20:54 PM</p><p><b>provider</b>: <a href=\"#Organization_rtpbc-organization-03\">See above (Organization/rtpbc-organization-03)</a></p><p><b>priority</b>: <span title=\"Codes: {http://terminology.hl7.org/CodeSystem/processpriority normal}\">Normal</span></p><p><b>prescription</b>: <a href=\"#MedicationRequest_rtpbc-medicationrequest-03\">See above (MedicationRequest/rtpbc-medicationrequest-03)</a></p><h3>CareTeams</h3><table class=\"grid\"><tr><td>-</td><td><b>Sequence</b></td><td><b>Provider</b></td></tr><tr><td>*</td><td>1</td><td><a href=\"#Practitioner_rtpbc-practitioner-03\">See above (Practitioner/rtpbc-practitioner-03)</a></td></tr></table><h3>Insurances</h3><table class=\"grid\"><tr><td>-</td><td><b>Sequence</b></td><td><b>Focal</b></td><td><b>Coverage</b></td></tr><tr><td>*</td><td>1</td><td>true</td><td><a href=\"#Coverage_rtpbc-coverage-03\">See above (Coverage/rtpbc-coverage-03)</a></td></tr></table><h3>Items</h3><table class=\"grid\"><tr><td>-</td><td><b>Sequence</b></td><td><b>CareTeamSequence</b></td><td><b>ProductOrService</b></td><td><b>Quantity</b></td></tr><tr><td>*</td><td>1</td><td>1</td><td><span title=\"Codes: {http://www.nlm.nih.gov/research/umls/rxnorm 205535}\">PROzac 10 MG Oral Capsule</span></td><td>60 {Each}</td></tr></table></div>"
        },
        "identifier": [
          {
            "value": "rtpbc-03"
          }
        ],
        "status": "active",
        "type": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/claim-type",
              "code": "pharmacy",
              "display": "Pharmacy"
            }
          ]
        },
        "use": "predetermination",
        "patient": {
          "reference": "Patient/rtpbc-patient-03"
        },
        "created": "2019-11-01T11:20:54-05:00",
        "provider": {
          "reference": "Organization/rtpbc-organization-03"
        },
        "priority": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/processpriority",
              "code": "normal",
              "display": "Normal"
            }
          ]
        },
        "prescription": {
          "reference": "MedicationRequest/rtpbc-medicationrequest-03"
        },
        "careTeam": [
          {
            "sequence": 1,
            "provider": {
              "reference": "Practitioner/rtpbc-practitioner-03"
            }
          }
        ],
        "insurance": [
          {
            "sequence": 1,
            "focal": true,
            "coverage": {
              "reference": "Coverage/rtpbc-coverage-03"
            }
          }
        ],
        "item": [
          {
            "sequence": 1,
            "careTeamSequence": [
              1
            ],
            "productOrService": {
              "coding": [
                {
                  "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                  "code": "205535",
                  "display": "PROzac 10 MG Oral Capsule"
                }
              ]
            },
            "quantity": {
              "value": 60,
              "unit": "{Each}"
            }
          }
        ]
      }
    },
    {
      "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0c",
      "resource": {
        "resourceType": "Patient",
        "id": "rtpbc-patient-03",
        "meta": {
          "profile": [
            "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-patient"
          ]
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: rtpbc-patient-03</p><p><b>meta</b>: </p><p><b>identifier</b>: Patient internal identifier: 30455</p><p><b>name</b>: Jane Doe </p><p><b>gender</b>: female</p><p><b>birthDate</b>: 1975-12-05</p><p><b>address</b>: 100 Oak Court Madison WI 53510 US </p></div>"
        },
        "identifier": [
          {
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                  "code": "PI",
                  "display": "Patient internal identifier"
                }
              ],
              "text": "Patient internal identifier"
            },
            "system": "http://example.org/MyPatientApp",
            "value": "30455"
          }
        ],
        "name": [
          {
            "family": "Doe",
            "given": [
              "Jane"
            ]
          }
        ],
        "gender": "female",
        "birthDate": "1975-12-05",
        "address": [
          {
            "line": [
              "100 Oak Court"
            ],
            "city": "Madison",
            "state": "WI",
            "postalCode": "53510",
            "country": "US"
          }
        ]
      }
    },
    {
      "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0d",
      "resource": {
        "resourceType": "Coverage",
        "id": "rtpbc-coverage-03",
        "meta": {
          "profile": [
            "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-coverage"
          ]
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: rtpbc-coverage-03</p><p><b>meta</b>: </p><p><b>status</b>: active</p><p><b>beneficiary</b>: <a href=\"#Patient_rtpbc-patient-03\">See above (Patient/rtpbc-patient-03)</a></p><p><b>payor</b>: <span></span></p><blockquote><p><b>class</b></p><p><b>type</b>: <span title=\"Codes: {http://terminology.hl7.org/CodeSystem/coverage-class rxbin}\">RX BIN</span></p><p><b>value</b>: BIN001</p></blockquote><blockquote><p><b>class</b></p><p><b>type</b>: <span title=\"Codes: {http://terminology.hl7.org/CodeSystem/coverage-class rxpcn}\">RX PCN</span></p><p><b>value</b>: PCN002</p></blockquote><blockquote><p><b>class</b></p><p><b>type</b>: <span title=\"Codes: {http://terminology.hl7.org/CodeSystem/coverage-class rxgroup}\">RX Group</span></p><p><b>value</b>: GROUP0001</p></blockquote><blockquote><p><b>class</b></p><p><b>type</b>: <span title=\"Codes: {http://terminology.hl7.org/CodeSystem/coverage-class rxid}\">RX Id</span></p><p><b>value</b>: MEMBER000001</p></blockquote></div>"
        },
        "status": "active",
        "beneficiary": {
          "reference": "Patient/rtpbc-patient-03"
        },
        "payor": [
          {
            "identifier": {
              "value": "Pharmacy Plans US"
            }
          }
        ],
        "class": [
          {
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/coverage-class",
                  "code": "rxbin"
                }
              ]
            },
            "value": "BIN001"
          },
          {
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/coverage-class",
                  "code": "rxpcn"
                }
              ]
            },
            "value": "PCN002"
          },
          {
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/coverage-class",
                  "code": "rxgroup"
                }
              ]
            },
            "value": "GROUP0001"
          },
          {
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/coverage-class",
                  "code": "rxid"
                }
              ]
            },
            "value": "MEMBER000001"
          }
        ]
      }
    },
    {
      "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0e",
      "resource": {
        "resourceType": "MedicationRequest",
        "id": "rtpbc-medicationrequest-03",
        "meta": {
          "profile": [
            "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-medicationrequest"
          ]
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: rtpbc-medicationrequest-03</p><p><b>meta</b>: </p><p><b>status</b>: draft</p><p><b>intent</b>: proposal</p><p><b>reported</b>: true</p><p><b>medication</b>: <span title=\"Codes: {http://www.nlm.nih.gov/research/umls/rxnorm 205535}\">PROzac 10 MG Oral Capsule</span></p><p><b>subject</b>: <a href=\"#Patient_rtpbc-patient-03\">See above (Patient/rtpbc-patient-03)</a></p><p><b>authoredOn</b>: 2019-11-01</p><p><b>requester</b>: <a href=\"#Practitioner_rtpbc-practitioner-03\">See above (Practitioner/rtpbc-practitioner-03)</a></p><p><b>dosageInstruction</b>: </p><h3>DispenseRequests</h3><table class=\"grid\"><tr><td>-</td><td><b>Quantity</b></td><td><b>ExpectedSupplyDuration</b></td><td><b>Performer</b></td></tr><tr><td>*</td><td>60 {Each}</td><td>30 days</td><td><a href=\"#Organization_rtpbc-organization-03\">See above (Organization/rtpbc-organization-03)</a></td></tr></table><h3>Substitutions</h3><table class=\"grid\"><tr><td>-</td><td><b>Allowed[x]</b></td></tr><tr><td>*</td><td>false</td></tr></table></div>"
        },
        "status": "draft",
        "intent": "proposal",
        "reportedBoolean": true,
        "medicationCodeableConcept": {
          "coding": [
            {
              "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
              "code": "205535",
              "display": "PROzac 10 MG Oral Capsule"
            }
          ]
        },
        "subject": {
          "reference": "Patient/rtpbc-patient-03"
        },
        "authoredOn": "2019-11-01",
        "requester": {
          "reference": "Practitioner/rtpbc-practitioner-03"
        },
        "dosageInstruction": [
          {
            "text": "Take 2 capsules once a day"
          }
        ],
        "dispenseRequest": {
          "quantity": {
            "value": 60,
            "unit": "{Each}"
          },
          "expectedSupplyDuration": {
            "value": 30,
            "unit": "days",
            "system": "http://unitsofmeasure.org",
            "code": "d"
          },
          "performer": {
            "reference": "Organization/rtpbc-organization-03"
          }
        },
        "substitution": {
          "allowedBoolean": false
        }
      }
    },
    {
      "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0f",
      "resource": {
        "resourceType": "Practitioner",
        "id": "rtpbc-practitioner-03",
        "meta": {
          "profile": [
            "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner"
          ]
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: rtpbc-practitioner-03</p><p><b>meta</b>: </p><p><b>identifier</b>: id: 1234567890</p><p><b>name</b>: Johnson </p></div>"
        },
        "identifier": [
          {
            "system": "http://hl7.org/fhir/sid/us-npi",
            "value": "1234567890"
          }
        ],
        "name": [
          {
            "family": "Johnson"
          }
        ]
      }
    },
    {
      "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0g",
      "resource": {
        "resourceType": "Organization",
        "id": "rtpbc-organization-03",
        "meta": {
          "profile": [
            "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-pharmacy-organization"
          ]
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: rtpbc-organization-03</p><p><b>meta</b>: </p><p><b>identifier</b>: id: 9876543210</p><p><b>active</b>: true</p><p><b>type</b>: <span title=\"Codes: {http://ncpdp.org/pharmacy-type R}\">Retail</span></p><p><b>name</b>: Hometown Drug</p><p><b>telecom</b>: ph: 6081234567</p><p><b>address</b>: 900 9th Street Madison WI 53535 US </p></div>"
        },
        "identifier": [
          {
            "system": "http://hl7.org/fhir/sid/us-npi",
            "value": "9876543210"
          }
        ],
        "active": true,
        "type": [
          {
            "coding": [
              {
                "system": "http://ncpdp.org/pharmacy-type",
                "code": "R",
                "display": "Retail"
              }
            ]
          }
        ],
        "name": "Hometown Drug",
        "telecom": [
          {
            "system": "phone",
            "value": "6081234567"
          }
        ],
        "address": [
          {
            "line": [
              "900 9th Street"
            ],
            "city": "Madison",
            "state": "WI",
            "postalCode": "53535",
            "country": "US"
          }
        ]
      }
    }
  ]
}

#Response Format

The response includes:

  • Patient cost-sharing amounts
  • Coverage restrictions
  • Prior authorization requirements
  • Alternative medication options (when available)

#Consistency with NCPDP RTPB

The RTPBC API is designed to be consistent with the provider-focused NCPDP RTPB standard:

  • Cost information must match between patient and provider views
  • Benefit restrictions must be consistently represented
  • Processing assumptions and definitions are aligned
  • Enables informed patient-provider discussions using the same data

#See Also

  • CARIN RTPBC Implementation Guide
  • NCPDP RTPB Standard
Status TwitterGitHub

© 2026 Flexpa. All rights reserved.

FHIR® is the registered trademark of Health Level Seven International and its use does not constitute endorsement by HL7.

On this page
  • Availability
  • Recent Updates
  • Implementation Notes
  • Request Format
  • Response Format
  • Consistency with NCPDP RTPB
  • See Also