Skip to main content
POST
cURL

Overview

Elation-specific webhook for posting patient payments by billId (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:
Then include the access token in the Authorization header:
Your 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

  1. Claim Lookup: Search for a claim matching billId via identifier system https://fhir.cairhealth.com/fhir/identifier/claim-id.
  2. 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.
  3. Absolute apply: Set on-claim paid to min(paymentAmount, cap); excess → unallocated PatientCredit + PATIENT_CASH.
  4. Persist: Update PatientPaymentDetails, FHIR PaymentReconciliation, and post DR CASH / CR PATIENT_AR for the applied delta.

Body

application/json

Patient payment information

billId
string
required

Elation bill.id that maps to Claim.identifier with system 'https://fhir.cairhealth.com/fhir/identifier/claim-id'

Minimum string length: 1
paymentAmount
number
required

Payment amount in USD

Required range: x > 0
paymentDate
string<date>

ISO 8601 date string (e.g., '2024-01-15'). Defaults to current date if not provided.

paymentMethod
string

Payment method (e.g., 'Credit Card', 'Debit Card', 'Stripe', 'Check', 'Cash')

paymentTraceId
string

Stripe payment intent ID or transaction ID (e.g., 'pi_1234567890')

Response

Payment processed successfully

success
boolean
required

Indicates whether the payment was processed successfully

message
string
required

Success message

data
object
required