Setup
POST
/api/v1/payments/setupCreates a Stripe setup intent for saving a payment method for future use. Returns a setup intent secret for use with client-side Stripe Elements.
cv-api-key
Production
https://api.care360-next.carevalidate.com/api/v1/payments/setupStaging
https://api-staging.care360-next.carevalidate.com/api/v1/payments/setupRequest Body
Body Parameters
metadataobjectoptionalOptional metadata to be stored with the setup intent
Show 2 child properties
emailstringoptionalEmail address associated with the setup intent
Example:
testemail@example.comphonestringoptionalPhone number associated with the setup intent
Example:
+1404567890Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the setup intent was created successfully |
paymentSecret | string | Secret key for client-side payment processing |
Changelog
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2026-02-03 | Initial Payment Setup API documentation |
Request Examples
- cURL
- JavaScript
- Python
curl -X POST "https://api.care360-next.carevalidate.com/api/v1/payments/setup" \
-H "cv-api-key: YOUR_SECRET_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"email": "testemail@example.com",
"phone": "+1404567890"
}
}'
const response = await fetch(
"https://api.care360-next.carevalidate.com/api/v1/payments/setup",
{
method: "POST",
headers: {
"cv-api-key": "YOUR_SECRET_KEY_HERE",
"Content-Type": "application/json",
},
body: JSON.stringify({
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/setup",
headers={
"cv-api-key": "YOUR_SECRET_KEY_HERE",
"Content-Type": "application/json",
},
json={
"metadata": {
"email": "testemail@example.com",
"phone": "+1404567890",
},
},
)
data = response.json()
print(data)
Responses
▶200SuccessSetup intent created successfully
{
"success": true,
"paymentSecret": "pi_3SG0o8GkkQS2eXzh0BKpSaq0_secret_CBrwqmT726jzfcnvCt0qBcS9e"
}
▶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
▶