SfepAnular
Description
Section titled “Description”Cancels an Electronic Invoice previously authorized by Panama’s DGI, identifying it by its CUFE. The node sends the cancellation request to the PAC configured in the credential and, if accepted, updates the document’s status to cancelled in Floogos’s database.
Cancellation always requires a reason (minimum 5 characters), which is logged in the document’s local history.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | SFEP credential |
| cufe | text | Yes | CUFE of the FE to cancel |
| motivo | textarea | Yes | Cancellation reason |
Credentials
Section titled “Credentials”This module requires an sfep credential type (PAC data, token, environment, etc. per metadata).
Output
Section titled “Output”{ "cufe": "FE0120000000000001000012320260805...", "estado": "cancelled", "motivo": "Error in the receiver's RUC"}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-sfep-prod", "cufe": "FE0120000000000001000012320260805...", "motivo": "Error in the receiver's RUC"}- The reason must be at least 5 characters long; if not sent, the node stops before contacting the PAC.
- Not every PAC adapter supports cancellation; if the configured provider does not implement it, the node returns an error stating so.
- Once cancelled, the FE is marked as
cancelledin thesfep_documentstable and should no longer be used as a reference for credit/debit notes. - The DGI sets deadlines for cancelling an FE; past that window the PAC will reject the cancellation.
Related Nodes
Section titled “Related Nodes”- SfepEmitirFactura - Issue the invoice to be cancelled
- SfepEmitirNota - Issue a credit/debit note
- SfepRepresentacion - Generate the printable representation (CAFE) with QR