Skip to main content

Update user payment

POST/api/v1/users

Updates the saved payment method and shipping address for an existing user.

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

Headers

Headers
cv-api-keystringrequired
Your unique API key for authentication.
Content-Typestringrequired
Must be application/json.
Example: application/json

Request Body

Body Parameters
actionstringrequired
The action to be performed. Must be UPDATE_PAYMENT_INFO.
Values:UPDATE_PAYMENT_INFO
emailstringrequired
The user's email address.
Example: john@example.com
dataobjectrequired
An object containing the payment details.
Show 3 child properties
stripeSetupIdstringrequired
The Stripe setup ID.
nmiPaymentTokenstringrequired
The NMI payment token.
shippingAddressobjectrequired
The shipping address.
Show 6 child properties
addressLine1stringrequired
Street address line 1
Example: 1600 Pennsylvania Avenue NW
addressLine2stringrequired
Street address line 2 (e.g., apartment or suite number)
citystringrequired
City
Example: Washington
statestringrequired
US state abbreviation (e.g., DC, NY)
Example: DC
countrystringrequired
Country code (e.g., US)
Example: US
postalCodestringrequired
Postal or ZIP code
Example: 20500

Example Request

curl --location '<BASE_URL>/api/v1/users' \
--header 'cv-api-key: <redacted>' \
--header 'Content-Type: application/json' \
--data-raw '{
"action": "UPDATE_PAYMENT_INFO",
"email": "john@example.com",
"data": {
"stripeSetupId": "<redacted>",
"nmiPaymentToken": "<redacted>",
"shippingAddress": {
"addressLine1": "1600 Pennsylvania Avenue NW",
"addressLine2": "",
"city": "Washington",
"state": "DC",
"country": "US",
"postalCode": "20500"
}
}
}'

Responses

200Payment updated successfullyThe payment details were updated successfully.
{
"status": 200,
"success": true,
"data": {
"code": "PAYMENT_SETUP_UPDATED"
}
}
400User does not existThe email provided does not match an existing user.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "User {email} does not exist"
}
400Invalid Stripe setup IDThe stripeSetupId does not match an existing setup intent.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "No such setupintent: 'seti_1SNZDLKAXrtjbq2duGldHsHf'"
}

Try It Out