Skip to main content

Intent

POST/api/v1/payments/intent

Creates a Stripe payment intent for immediate payment processing. Returns a payment intent secret for use with client-side Stripe Elements.

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

Request Body

Body Parameters
amountnumberrequired

Payment amount (e.g: 1.15 equals $1.15)

Example: 100
paymentMethodTypesarrayoptional

Array of supported payment method types. Common types include: "card" (credit/debit card), "klarna" (buy now, pay later), "affirm" (buy now, pay later). See Stripe Payment Methods documentation for full list.

Example: ["affirm", "klarna", "card"]
metadataobjectoptional

Optional metadata to be stored with the payment intent

Show 2 child properties
emailstringoptional

Email address associated with the payment

Example: testemail@example.com
phonestringoptional

Phone number associated with the payment

Example: +1404567890

Response Fields

FieldTypeDescription
statusnumberHTTP status code
successbooleanIndicates if the payment intent was created successfully
messagestringSuccess message describing the operation
dataobjectContains the payment intent information
data.paymentIntentSecretstringSecret key for client-side payment processing

Changelog

VersionDateChanges
1.02025-01-27Initial Payment Intent API documentation

Request Examples

curl -X POST "https://api.care360-next.carevalidate.com/api/v1/payments/intent" \
-H "cv-api-key: YOUR_SECRET_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"amount": 100,
"paymentMethodTypes": ["affirm", "klarna", "card"],
"metadata": {
"email": "testemail@example.com",
"phone": "+1404567890"
}
}'

Responses

200SuccessPayment intent created successfully
{
"status": 200,
"success": true,
"message": "Payment intent created successfully",
"data": {
"paymentIntentSecret": "pi_3SG0o8GkkQS2eXzh0BKpSaq0_secret_CBrwqmT726jzfcnvCt0qBcS9e"
}
}
400Missing Required ParametersAmount is required
{
"success": false,
"message": "Amount is required"
}
400Invalid AmountAmount must be a positive number
{
"success": false,
"message": "Amount must be a positive number"
}
400Invalid Payment Method TypesInvalid payment method types provided
{
"success": false,
"message": "Invalid payment method types"
}
401UnauthorizedInvalid or missing API key
{
"status": 401,
"error": "Invalid API key"
}
500Internal Server ErrorAn unexpected error occurred
{
"success": false,
"message": "Internal server error"
}

Try It Out