Patient Payments
Patient Payment
Elation-specific webhook: absolute-set patient payment by billId. Caps at ledger paid + remaining PATIENT_AR; excess is unallocated PATIENT_CASH.
POST
cURL
Overview
Elation-specific webhook for posting patient payments bybillId (Elation bill.id). Payments use absolute-set semantics: paymentAmount is the new paid total on the claim.
The amount applied to the claim is capped at ledger paid + remaining PATIENT_AR. Anything above that remaining room is an unallocated PATIENT_CASH credit — including posts before a remit TRANSFER_TO_PATIENT (when PATIENT_AR is still $0).
For additive claimLifecycleId / refund posts (everyone else), use Patient Payment V2.
Use Cases
- Payment Processing Integration: Integrate with payment processors (Stripe, Square, etc.) to automatically record patient payments
- EHR Integration: Connect with EHR systems like Elation to sync patient payment data via
billId - Automated Payment Recording: Automatically update claims when payments are received through external systems
Authentication
This endpoint requires JWT access token authentication, consistent with all other public API endpoints. First, obtain an access token by calling the/api/token endpoint with your clientId and clientSecret:
clientId and clientSecret can be found in your admin panel.
Request Body
string
required
The Elation bill.id that maps to the Claim identifier. This should match the
Claim identifier with system
https://fhir.cairhealth.com/fhir/identifier/claim-id.number
required
The payment amount in USD. Must be a positive number. Interpreted as the
absolute paid total to set on the claim (capped at ledger remaining room).
string
The date of the payment in ISO 8601 format (e.g., “2024-01-15” or
“2024-01-15T10:30:00Z”). If not provided, defaults to the current date.
string
The method of payment (e.g., “Credit Card”, “Debit Card”, “Stripe”, “Check”,
“Cash”).
string
The transaction ID or payment intent ID from the payment processor (e.g.,
Stripe payment intent ID like “pi_1234567890”).
Example Request
Response
Success Response (200)
excessAmount is only present when the payment exceeds remaining PATIENT_AR. ledgerPosted is true when a CASH / PATIENT_AR (or refund) event was written.
Error Responses
- 400 — invalid body or missing required fields
- 401 — invalid/missing token
- 404 — claim not found for
billId - 500 — unexpected error during payment processing
Payment Processing Logic
- Claim Lookup: Search for a claim matching
billIdvia identifier systemhttps://fhir.cairhealth.com/fhir/identifier/claim-id. - Ledger cap: Max on-claim paid = current ledger paid +
max(0, PATIENT_AR). Remaining room of $0 (including pre-drop) sends the full amount to PATIENT_CASH. - Absolute apply: Set on-claim paid to
min(paymentAmount, cap); excess → unallocatedPatientCredit+ PATIENT_CASH. - Persist: Update
PatientPaymentDetails, FHIRPaymentReconciliation, and post DR CASH / CR PATIENT_AR for the applied delta.
Related Endpoints
Body
application/json
Patient payment information
Elation bill.id that maps to Claim.identifier with system 'https://fhir.cairhealth.com/fhir/identifier/claim-id'
Minimum string length:
1Payment amount in USD
Required range:
x > 0ISO 8601 date string (e.g., '2024-01-15'). Defaults to current date if not provided.
Payment method (e.g., 'Credit Card', 'Debit Card', 'Stripe', 'Check', 'Cash')
Stripe payment intent ID or transaction ID (e.g., 'pi_1234567890')

