Skip to main content
GET
cURL

Overview

Returns patient balances aligned with the Patient Balances chart: outstanding is max(0, PATIENT_AR) per claim (Insurance Balance Forward lifecycles excluded), paid is ledger PATIENT_AR credits (PATIENT_PAYMENT / OPENING_BALANCE / PATIENT_CREDIT_ALLOCATION), and unallocated credits are the state-based PATIENT_CASH total. Also returns:
  • currentBalance — same formula as the chart Payment Summary: max(0, Σ claim outstanding + Σ manual remaining − unallocated credits)
  • lastPayment — newest payment from the Transactions ledger (listPatientPaymentTransactionsFromLedger): amount, date, method, trace id
  • Manual charges with ledger remainingBalance (and gross patientBalance)
Look up the patient with your external patientId. Resolution uses the org integration patients.patientIdentifierSystem when set; otherwise Cair’s default https://fhir.cairhealth.com/fhir/identifier/customer-patient-id (cairProfessional and similar).

Authentication

JWT Bearer token from /api/token.

Query Parameters

string
required
External patient id (integration patientIdentifierSystem, or customer-patient-id by default).

Example

Response

currentBalance matches the patient chart Outstanding Balance. lastPayment is the most recent Transactions-tab payment (true payment amount + date), or null when none exist. patientPaidAmount and per-claim paymentDetails.paymentAmount are lifecycle total paid (not the last payment alone). Prefer top-level lastPayment for “last payment $ on date”. netOutstandingBalance is remaining PATIENT_AR. Unallocated credit ids are ledger event ids.

Query Parameters

patientId
string
required

External patient id (org patients.patientIdentifierSystem, or customer-patient-id by default)

Response

Balances fetched successfully

success
boolean
data
object