Endpoint
PUT /api/customers/update
Updates an existing customer’s information in Stripe. The userId field is required to identify the customer. Email, name, and phone are optional and only fields provided will be updated.
Request Body
The Stripe customer ID to update (format: cus_...)
Updated email address for the customer
Updated name for the customer
Updated phone number for the customer
Response
Indicates if the request was successful
Response message describing the result
Updated customer object Unique Stripe customer ID
Customer’s updated email address
Customer’s updated phone number
Examples
curl -X PUT https://your-domain.com/api/customers/update \
-H "Content-Type: application/json" \
-d '{
"userId": "cus_1234567890abcdef",
"email": "[email protected] ",
"name": "John Updated Doe",
"phone": "+1234567899"
}'
Response Examples
Success (200)
{
"status" : true ,
"message" : "Cliente actualizado correctamente" ,
"data" : {
"id" : "cus_1234567890abcdef" ,
"email" : "[email protected] " ,
"name" : "John Updated Doe" ,
"phone" : "+1234567899"
}
}
Error (400)
{
"status" : false ,
"message" : "userId es requerido" ,
"code" : null
}
Error (500)
{
"status" : false ,
"message" : "Error interno del servidor" ,
"code" : null
}