Skip to main content

Case Payments

POST/api/v1/cases/:caseId/payments

Creates a payment record for a case. Optionally preauthorizes payment amount via Stripe when preauthorize is true.

cv-api-key
Productionhttps://api.care360-next.carevalidate.com/api/v1/cases/:caseId/payments
Staginghttps://api-staging.care360-next.carevalidate.com/api/v1/cases/:caseId/payments

Path Parameters

caseIdstringrequired

The case identifier (UUID v4).

Example: 9f0f2f70-f536-4b1d-8ed4-c831f4a4bcab

Request Body

Body Parameters
amountnumberrequired

Payment amount. Must be a positive number.

Example: 100
descriptionstringrequired

Optional payment description.

Example: Creating preauthorized payment for DEMO
productIdstringoptional

Optional product identifier (UUID v4).

Example: 0d8b6f56-4f10-4b68-89c5-cf6593f74c0f
statusstringoptional

Payment status. Defaults to UNPAID.

Example: UNPAID
idempotencyKeystringoptional

Optional unique key to prevent duplicate payment creation. Scoped per organization.

Example: case-payment-unique-key-001
preauthorizebooleanoptional

When true, preauthorizes the amount via Stripe. Defaults to false.

Example: true

Workflow Behavior

  • If preauthorize is omitted or set to false, the API creates a case payment record with status UNPAID.
  • If preauthorize is set to true, the API preauthorizes the amount via Stripe. The amount on hold can be captured later.

Response Fields

FieldTypeDescription
successbooleanIndicates if the request was successful
messagestringSuccess or error message
data.result.paymentIdstringUnique identifier of the created case payment
data.result.statusstringPayment status
data.result.amountnumberPayment amount
data.result.descriptionstring | nullPayment description
data.result.createdAtstringPayment creation timestamp (ISO 8601)

Request Examples

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"
}'

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