Case Payments
POST
/api/v1/cases/:caseId/paymentsCreates a payment record for a case. Optionally preauthorizes payment amount via Stripe when preauthorize is true.
cv-api-key
Production
https://api.care360-next.carevalidate.com/api/v1/cases/:caseId/paymentsStaging
https://api-staging.care360-next.carevalidate.com/api/v1/cases/:caseId/paymentsPath Parameters
caseIdstringrequiredThe case identifier (UUID v4).
Example:
9f0f2f70-f536-4b1d-8ed4-c831f4a4bcabRequest Body
Body Parameters
amountnumberrequiredPayment amount. Must be a positive number.
Example:
100descriptionstringrequiredOptional payment description.
Example:
Creating preauthorized payment for DEMOproductIdstringoptionalOptional product identifier (UUID v4).
Example:
0d8b6f56-4f10-4b68-89c5-cf6593f74c0fstatusstringoptionalPayment status. Defaults to UNPAID.
Example:
UNPAIDidempotencyKeystringoptionalOptional unique key to prevent duplicate payment creation. Scoped per organization.
Example:
case-payment-unique-key-001preauthorizebooleanoptionalWhen true, preauthorizes the amount via Stripe. Defaults to false.
Example:
trueWorkflow Behavior
- If
preauthorizeis omitted or set tofalse, the API creates a case payment record with statusUNPAID. - If
preauthorizeis set totrue, the API preauthorizes the amount via Stripe. The amount on hold can be captured later.
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful |
message | string | Success or error message |
data.result.paymentId | string | Unique identifier of the created case payment |
data.result.status | string | Payment status |
data.result.amount | number | Payment amount |
data.result.description | string | null | Payment description |
data.result.createdAt | string | Payment creation timestamp (ISO 8601) |
Request Examples
- cURL
- JavaScript
- Python
curl -X POST "https://api.care360-next.carevalidate.com/api/v1/cases/9f0f2f70-f536-4b1d-8ed4-c831f4a4bcab/payments" \
-H "cv-api-key: YOUR_SECRET_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"status": "UNPAID",
"preauthorize": true,
"description": "Creating preauthorized payment for DEMO"
}'
const response = await fetch(
"https://api.care360-next.carevalidate.com/api/v1/cases/9f0f2f70-f536-4b1d-8ed4-c831f4a4bcab/payments",
{
method: "POST",
headers: {
"cv-api-key": "YOUR_SECRET_KEY_HERE",
"Content-Type": "application/json",
},
body: JSON.stringify({
amount: 100.0,
status: "UNPAID",
preauthorize: true,
description: "Creating preauthorized payment for DEMO",
}),
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://api.care360-next.carevalidate.com/api/v1/cases/9f0f2f70-f536-4b1d-8ed4-c831f4a4bcab/payments",
headers={
"cv-api-key": "YOUR_SECRET_KEY_HERE",
"Content-Type": "application/json",
},
json={
"amount": 100.00,
"status": "UNPAID",
"preauthorize": true,
"description": "Creating preauthorized payment for DEMO",
},
)
data = response.json()
print(data)
Responses
▶200SuccessCase payment created successfully.
{
"success": true,
"message": "Case payment created successfully",
"data": {
"result": {
"paymentId": "9d2461f0-54b8-43dd-9507-e3143d4a50a1",
"status": "UNPAID",
"amount": 100,
"description": "Creating unpaid case payment",
"createdAt": "2026-05-06T12:54:10.287Z"
}
}
}
▶400Validation ErrorInvalid payload such as missing caseId or non-positive amount.
{
"success": false,
"message": "Amount must be a positive number"
}
▶401UnauthorizedInvalid or missing API key.
{
"status": 401,
"error": "Invalid API key"
}
Try It Out
Try itAPI Playground
▶