> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cairhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Claim Payment

> Absolutely edit an existing lifecycle patient payment. Returns 404 if no prior payment exists.

## Overview

Absolutely updates an **existing** patient payment on a claim lifecycle (`PatientPaymentDetails` + `patientPaidAmount`). Returns 404 if no prior payment exists for that lifecycle. Overpayment above patient responsibility creates an unallocated credit.

This is an edit path, not an additive post. To add a partial payment or refund, use [Patient Payment](/api-reference/endpoint/webhooks/patient-payment).

## Authentication

JWT Bearer token from `/api/token`.

## Path Parameters

<ParamField path="claimLifecycleId" type="string" required>
  Cair claim lifecycle id.
</ParamField>

## Request Body

<ParamField body="paymentAmount" type="number" required>
  Absolute paid amount to set (>= 0).
</ParamField>

<ParamField body="paymentDate" type="string" required={false}>
  ISO 8601 payment date.
</ParamField>

<ParamField body="paymentMethod" type="string" required={false}>
  Payment method.
</ParamField>

<ParamField body="paymentTraceId" type="string" required={false}>
  Processor transaction id.
</ParamField>

## Example

```bash theme={null}
curl -X PATCH \
  "https://forecaster.cairhealth.com/api/patient-payments/claims/lifecycle-12345" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "paymentAmount": 60.00,
    "paymentMethod": "Check",
    "paymentTraceId": "chk-999"
  }'
```

## Response

```json theme={null}
{
  "success": true,
  "message": "Patient payment updated successfully",
  "data": {
    "claimId": "claim-uuid",
    "claimLifecycleId": "lifecycle-12345",
    "previousPaid": 50.0,
    "amountSetOnClaim": 60.0
  }
}
```


## OpenAPI

````yaml PATCH /api/patient-payments/claims/{claimLifecycleId}
openapi: 3.1.0
info:
  title: Cair Health APIs
  description: APIs for the Cair Health platform
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://forecaster.cairhealth.com
security:
  - bearerAuth: []
paths:
  /api/patient-payments/claims/{claimLifecycleId}:
    patch:
      description: >-
        Absolutely edit an existing lifecycle patient payment. Returns 404 if no
        prior payment exists.
      parameters:
        - name: claimLifecycleId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentAmount:
                  type: number
                  minimum: 0
                  description: Absolute paid amount to set
                paymentDate:
                  type: string
                  format: date
                paymentMethod:
                  type: string
                paymentTraceId:
                  type: string
              required:
                - paymentAmount
            example:
              paymentAmount: 60
              paymentMethod: Check
      responses:
        '200':
          description: Payment updated
        '400':
          description: Invalid body
        '401':
          description: Unauthorized
        '404':
          description: No existing payment / claim not found
        '500':
          description: Server error
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````