Saltar a contenido

Cancel an invoice

Cancel a signed invoice belonging to the calling issuer. A payment complement is refused (invalid_state, naming the blocking ones) while a later installment of an invoice it pays is still active, and a PPD invoice while it has active payment complements: the later complements are canceled first. motivo is the SAT cancellation reason: 01 issued with errors, with a related document (then substitution_uuid, the folio fiscal of the CFDI that replaces this one, is required); 02 issued with errors, without a related document; 03 the operation was not carried out; 04 nominative operation related to a global invoice. substitution_uuid is refused with any other motivo.

Alcance (scope): invoices:write · Características: Destructiva, Interactúa con el mundo exterior

Parámetros

Parámetro Tipo Obligatorio Descripción
invoice_id string Sí
motivo string Sí
substitution_uuid string No
issuer string Sí Id of the issuer the call acts for, from list_issuers.

Esquema de entrada (JSON Schema)

{
  "type": "object",
  "properties": {
    "invoice_id": {
      "type": "string"
    },
    "motivo": {
      "type": "string",
      "enum": [
        "01",
        "02",
        "03",
        "04"
      ]
    },
    "substitution_uuid": {
      "type": "string",
      "format": "uuid"
    },
    "issuer": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the issuer the call acts for, from list_issuers."
    }
  },
  "required": [
    "invoice_id",
    "motivo",
    "issuer"
  ]
}