Intent
POST
/api/v1/payments/intentCreates a Stripe payment intent for immediate payment processing. Returns a payment intent secret for use with client-side Stripe Elements.
cv-api-key
Production
https://api.care360-next.carevalidate.com/api/v1/payments/intentStaging
https://api-staging.care360-next.carevalidate.com/api/v1/payments/intentRequest Body
Body Parameters
amountnumberrequiredPayment amount (e.g: 1.15 equals $1.15)
Example:
100paymentMethodTypesarrayoptionalArray 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"]metadataobjectoptionalOptional metadata to be stored with the payment intent
Show 2 child properties
emailstringoptionalEmail address associated with the payment
Example:
testemail@example.comphonestringoptionalPhone number associated with the payment
Example:
+1404567890Response Fields
| Field | Type | Description |
|---|---|---|
status | number | HTTP status code |
success | boolean | Indicates if the payment intent was created successfully |
message | string | Success message describing the operation |
data | object | Contains the payment intent information |
data.paymentIntentSecret | string | Secret key for client-side payment processing |
Changelog
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2025-01-27 | Initial Payment Intent API documentation |
Request Examples
- cURL
- JavaScript
- Python
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"
}
}'
const response = await fetch(
"https://api.care360-next.carevalidate.com/api/v1/payments/intent",
{
method: "POST",
headers: {
"cv-api-key": "YOUR_SECRET_KEY_HERE",
"Content-Type": "application/json",
},
body: JSON.stringify({
amount: 100,
paymentMethodTypes: ["affirm", "klarna", "card"],
metadata: {
email: "testemail@example.com",
phone: "+1404567890",
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://api.care360-next.carevalidate.com/api/v1/payments/intent",
headers={
"cv-api-key": "YOUR_SECRET_KEY_HERE",
"Content-Type": "application/json",
},
json={
"amount": 100,
"paymentMethodTypes": ["affirm", "klarna", "card"],
"metadata": {
"email": "testemail@example.com",
"phone": "+1404567890",
},
},
)
data = response.json()
print(data)
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
Try itAPI Playground
▶