---
title: "POST /api/webhooks/patient-payment"
method: POST
path: "/api/webhooks/patient-payment"
---

# POST /api/webhooks/patient-payment

`POST /api/webhooks/patient-payment`

Webhook endpoint for processing patient payments from external systems (e.g., Stripe via Elation). Updates the associated claim with payment information and handles overpayments by creating unallocated patient credits.

## Request body

- object
  - `billId` string, required — Elation bill.id that maps to Claim.identifier with system 'https://fhir.cairhealth.com/fhir/identifier/claim-id'
  - `paymentAmount` number, required — Payment amount in USD
  - `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 `200`

Payment processed successfully

- object
  - `success` boolean, required — Indicates whether the payment was processed successfully
  - `message` string, required — Success message
  - `data` object, required
    - `claimId` string, required — UUID of the claim that was updated
    - `claimLifecycleId` string, required — Lifecycle ID of the claim
    - `amountSetOnClaim` number, required — Amount that was set on the claim (may be less than paymentAmount if payment exceeds patient responsibility)
    - `excessAmount` number — Excess amount if payment exceeds patient responsibility (only present if excessAmount > 0)

## Other responses

- `400` — Invalid request body or missing required fields
- `401` — Unauthorized - Invalid clientId or clientSecret
- `404` — Claim not found for the provided billId
- `500` — Internal server error during payment processing

---

[API](https://skmtc.net/cairhealth/apis/cair-health-apis.md) · [All operations](https://skmtc.net/cairhealth/apis/cair-health-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cairhealth/cair-health-apis/revisions/dfc60069747b/schema)
