NewStripe: a buyer with a NIF always gets a standard invoice, and the simplified threshold is deprecated
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog
ErrorsAll codes

CANNOT_DELETE_PRIMARY

The account's primary company cannot be deleted.


Category: Companies

HTTP status400 Bad Request
RetryNo

When it happens

The company is the account's primary NIF, which cannot be deleted.

How to fix it

Nothing to retry: the primary company stays with the account.

Retry

Do not retry. The outcome is final: sending the same request again gets the same answer.

Returned by

The operations where this code is most likely. The list is not exhaustive.

Example response

When this error occurs, the API answers 400 Bad Request with a JSON body of this shape:

{
  "type": "https://docs.beel.es/errors/CANNOT_DELETE_PRIMARY",
  "title": "CANNOT_DELETE_PRIMARY",
  "detail": "The account's primary company cannot be deleted.",
  "instance": "/v1/<resource>",
  "errors": [],
  "success": false,
  "error": {
    "code": "CANNOT_DELETE_PRIMARY",
    "message": "The account's primary company cannot be deleted.",
    "details": {}
  },
  "meta": {
    "timestamp": "2026-05-21T10:00:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

The type URI is stable and always resolves to this page.

Message

The account's primary company cannot be deleted.
No se puede eliminar la empresa principal de la cuenta.
No es pot eliminar l'empresa principal del compte.

Send the request with Accept-Language: <es|en|ca> to receive the message in your preferred language.

Other errors in this category

Keep exploring