Skip to content

SatCancelarCFDI

Cancels a CFDI with the SAT that has already been stamped, using the same PAC configured on the credential. Requires the UUID (fiscal folio) of the receipt and the cancellation reason from the SAT catalog. When the reason is “01” (errors with relation), the UUID of the replacement invoice is required. Depending on the amount and the time elapsed since stamping, the SAT may require the recipient’s acceptance before the cancellation is completed.

FieldTypeRequiredDescription
credentials_idcredentialsYesSAT credential (CSD + PAC)
uuidtextYesUUID (fiscal folio) of the CFDI to cancel
motivoselectYesSAT cancellation reason (default: 02)
sustituciontextNoUUID of the replacement invoice (required if motivo is 01)
CodeDescription
01Issued with errors, with relation (requires sustitucion)
02Issued with errors, without relation (default)
03Operation not carried out
04Nominative operation related to a global invoice

Requires a sat credential type with:

  • CSD: digital seal certificate (.p12 or .cer + .key) and its password
  • Issuer RFC, legal name, fiscal regime and postal code
  • PAC: stamping provider (facturama, finkok or sw) and its access credentials
  • Environment: test or production
{
"success": true,
"uuid": "A1B2C3D4-E5F6-4A5B-9C8D-1234567890AB",
"estado": "cancelled",
"motivo": "02",
"motivoDescripcion": "Errors without relation",
"estatus": "Cancelled without acceptance",
"acuse": "cancellation receipt returned by the PAC"
}

Cancel for an error without relation (reason 02)

Section titled “Cancel for an error without relation (reason 02)”
{
"credentials_id": "cred-sat-prod",
"uuid": "A1B2C3D4-E5F6-4A5B-9C8D-1234567890AB",
"motivo": "02"
}

Cancel with a replacement CFDI (reason 01)

Section titled “Cancel with a replacement CFDI (reason 01)”
{
"credentials_id": "cred-sat-prod",
"uuid": "A1B2C3D4-E5F6-4A5B-9C8D-1234567890AB",
"motivo": "01",
"sustitucion": "B2C3D4E5-F6A7-4B5C-9D8E-234567890ABC"
}
  • Reason 01 requires sustitucion (UUID of the invoice that replaces the cancelled one); if missing, the node returns an error before calling the PAC.
  • Cancellation runs through the same PAC configured on the credential used to stamp the original CFDI.
  • The estatus field reflects whether the cancellation is final or pending the recipient’s acceptance.