Endpoint
POST /api/customers/create
Creates a new customer in Stripe with the provided email, name, and phone number. All three fields are required.
Request Body
Response
Indicates if the request was successful
Response message describing the result
Customer object containing the created customer information
Unique Stripe customer ID (format: cus_...)
Examples
curl -X POST https://your-domain.com/api/customers/create \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"name": "John Doe",
"phone": "+1234567890"
}'
Response Examples
Success (201)
{
"status": true,
"message": "Cliente creado correctamente",
"data": {
"id": "cus_1234567890abcdef",
"email": "[email protected]",
"name": "John Doe",
"phone": "+1234567890"
}
}
Error (400)
{
"status": false,
"message": "email, name y phone son requeridos",
"code": null
}
Error (500)
{
"status": false,
"message": "Error interno del servidor",
"code": null
}