Patient Payments
Get Patient Balances
Fetch patient AR page–aligned balances: PATIENT_AR outstanding (IBF lifecycles excluded), ledger manual remaining, PATIENT_CASH unallocated credits, patient-level currentBalance, and lastPayment from Transactions ledger. Look up by external patientId.
GET
cURL
Overview
Returns patient balances aligned with the Patient Balances chart: outstanding ismax(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 grosspatientBalance)
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.
