Patient Payments
Edit Claim Payment
Absolutely edit an existing lifecycle patient payment. Returns 404 if no prior payment exists.
PATCH
/
api
/
patient-payments
/
claims
/
{claimLifecycleId}
cURL
curl --request PATCH \
--url https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId} \
--header 'Content-Type: application/json' \
--data '
{
"paymentAmount": 60,
"paymentMethod": "Check"
}
'import requests
url = "https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}"
payload = {
"paymentAmount": 60,
"paymentMethod": "Check"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({paymentAmount: 60, paymentMethod: 'Check'})
};
fetch('https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'paymentAmount' => 60,
'paymentMethod' => 'Check'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}"
payload := strings.NewReader("{\n \"paymentAmount\": 60,\n \"paymentMethod\": \"Check\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}")
.header("Content-Type", "application/json")
.body("{\n \"paymentAmount\": 60,\n \"paymentMethod\": \"Check\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentAmount\": 60,\n \"paymentMethod\": \"Check\"\n}"
response = http.request(request)
puts response.read_bodyOverview
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.
Authentication
JWT Bearer token from/api/token.
Path Parameters
string
required
Cair claim lifecycle id.
Request Body
number
required
Absolute paid amount to set (>= 0).
string
ISO 8601 payment date.
string
Payment method.
string
Processor transaction id.
Example
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
{
"success": true,
"message": "Patient payment updated successfully",
"data": {
"claimId": "claim-uuid",
"claimLifecycleId": "lifecycle-12345",
"previousPaid": 50.0,
"amountSetOnClaim": 60.0
}
}
⌘I
cURL
curl --request PATCH \
--url https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId} \
--header 'Content-Type: application/json' \
--data '
{
"paymentAmount": 60,
"paymentMethod": "Check"
}
'import requests
url = "https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}"
payload = {
"paymentAmount": 60,
"paymentMethod": "Check"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({paymentAmount: 60, paymentMethod: 'Check'})
};
fetch('https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'paymentAmount' => 60,
'paymentMethod' => 'Check'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}"
payload := strings.NewReader("{\n \"paymentAmount\": 60,\n \"paymentMethod\": \"Check\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}")
.header("Content-Type", "application/json")
.body("{\n \"paymentAmount\": 60,\n \"paymentMethod\": \"Check\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://forecaster.cairhealth.com/api/patient-payments/claims/{claimLifecycleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentAmount\": 60,\n \"paymentMethod\": \"Check\"\n}"
response = http.request(request)
puts response.read_body
