Complete Setup
POST
/api/v1/complete-payment-setupFinalizes a Stripe setup intent and links the saved payment method and shipping address to all of the user's cases. Call this after the client-side Stripe Elements flow completes successfully.
cv-api-key
Production
https://api.care360-next.carevalidate.com/api/v1/complete-payment-setupStaging
https://api-staging.care360-next.carevalidate.com/api/v1/complete-payment-setupHeaders
Headers
cv-api-keystringrequiredYour organization's secret API key.
Example:
YOUR_SECRET_KEY_HEREContent-TypestringrequiredMust be application/json.
Example:
application/jsonRequest Body
Body Parameters
stripeSetupIDstringrequiredThe Stripe setup intent ID returned by POST /api/v1/payments/setup after the client confirms it via Stripe Elements.
Example:
seti_1Example00000000000000000shippingAddressobjectrequiredShipping address to associate with the payment method and user's cases.
Show 6 child properties
line1stringrequiredStreet address line 1.
Example:
123 Main Stline2stringoptionalStreet address line 2 (apartment, suite, etc.).
Example:
Apt 4BcitystringrequiredCity.
Example:
AtlantastatestringrequiredTwo-letter state code.
Example:
GAcountrystringrequiredTwo-letter country code.
Example:
USpostal_codestringrequiredZIP or postal code.
Example:
30301Response Fields
| Field | Type | Description |
|---|---|---|
status | number | HTTP status code |
success | boolean | true when the setup was finalized successfully |
Changelog
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2026-06-17 | Initial documentation |
Request Examples
- cURL
- JavaScript
- Python
curl -X POST "https://api.care360-next.carevalidate.com/api/v1/complete-payment-setup" \
-H "cv-api-key: YOUR_SECRET_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"stripeSetupID": "seti_1Example00000000000000000",
"shippingAddress": {
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "Atlanta",
"state": "GA",
"country": "US",
"postal_code": "30301"
}
}'
const response = await fetch(
"https://api.care360-next.carevalidate.com/api/v1/complete-payment-setup",
{
method: "POST",
headers: {
"cv-api-key": "YOUR_SECRET_KEY_HERE",
"Content-Type": "application/json",
},
body: JSON.stringify({
stripeSetupID: "seti_1Example00000000000000000",
shippingAddress: {
line1: "123 Main St",
line2: "Apt 4B",
city: "Atlanta",
state: "GA",
country: "US",
postal_code: "30301",
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://api.care360-next.carevalidate.com/api/v1/complete-payment-setup",
headers={
"cv-api-key": "YOUR_SECRET_KEY_HERE",
"Content-Type": "application/json",
},
json={
"stripeSetupID": "seti_1Example00000000000000000",
"shippingAddress": {
"line1": "123 Main St",
"line2": "Apt 4B",
"city": "Atlanta",
"state": "GA",
"country": "US",
"postal_code": "30301",
},
},
)
data = response.json()
print(data)
Responses
▶200SuccessSetup finalized. Payment method and shipping address linked to the user's cases.
{
"status": 200,
"success": true
}
▶400Missing cv-api-keyThe cv-api-key header was not provided.
{
"status": 400,
"success": false,
"error": "Missing cv-api-key header"
}
▶400Missing or invalid fieldsstripeSetupID is missing or one of the required shipping address fields is empty.
{
"status": 400,
"error": "Shipping address line 1 must be provided"
}
▶401Permission deniedThe email on the Stripe setup intent does not belong to the requesting organization.
{
"status": 401,
"error": "Permission denied"
}
Try It Out
Try itAPI Playground
▶