SatCancelarCFDI
Description
Section titled “Description”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.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | SAT credential (CSD + PAC) |
| uuid | text | Yes | UUID (fiscal folio) of the CFDI to cancel |
| motivo | select | Yes | SAT cancellation reason (default: 02) |
| sustitucion | text | No | UUID of the replacement invoice (required if motivo is 01) |
SAT cancellation reasons
Section titled “SAT cancellation reasons”| Code | Description |
|---|---|
| 01 | Issued with errors, with relation (requires sustitucion) |
| 02 | Issued with errors, without relation (default) |
| 03 | Operation not carried out |
| 04 | Nominative operation related to a global invoice |
Credentials
Section titled “Credentials”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
Output
Section titled “Output”{ "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"}Usage Example
Section titled “Usage Example”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
estatusfield reflects whether the cancellation is final or pending the recipient’s acceptance.
Related Nodes
Section titled “Related Nodes”- SatTimbrarCFDI - Stamp a CFDI
- SatConsultarEstatus - Check whether a CFDI is valid or cancelled