Skip to main content

Endpoint

DELETE /api/customers/delete Deletes a customer from Stripe. The customer ID can be provided either in the request body as userId or as a URL parameter.

Request Body

userId
string
required
The Stripe customer ID to delete (format: cus_...)
Alternatively, you can pass the customer ID as a URL parameter (/api/customers/:id) instead of in the request body.

Response

status
boolean
Indicates if the request was successful
message
string
Response message describing the result
data
object
Object containing the ID of the deleted customer

Examples

curl -X DELETE https://your-domain.com/api/customers/delete \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "cus_1234567890abcdef"
  }'

Response Examples

Success (200)

{
  "status": true,
  "message": "Usuario eliminado con éxito",
  "data": {
    "id": "cus_1234567890abcdef"
  }
}

Error (400)

{
  "status": false,
  "message": "id del usuario es requerido",
  "code": null
}

Error (500)

{
  "status": false,
  "message": "Error interno del servidor",
  "code": null
}

Build docs developers (and LLMs) love