SfepEmitirNota
Description
Section titled “Description”Issues a Credit Note (04) or a Debit Note (05) to Panama’s DGI under the SFEP model, always referencing the origin Electronic Invoice by its CUFE. The node builds the note’s XML, optionally signs it if an issuer certificate is loaded in the credential, and sends it to the configured PAC for authorization.
Just like with invoices, if there is no issuer certificate the PAC signs the document. The authorized note receives its own CUFE, distinct from the referenced FE’s.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | SFEP credential |
| nota | json | No | Note (JSON): tipo (04 credit, 05 debit), referencia {cufe, numero, fecha} of the origin FE, receptor, items (precioUnitario without ITBMS). If omitted, the input data is used |
Credentials
Section titled “Credentials”This module requires an sfep credential type (issuer RUC and business name, PAC provider, PAC token/username, optional .p12 certificate, environment).
Output
Section titled “Output”{ "numero": "0000045", "puntoFacturacion": "001", "tipo": "04", "estado": "authorized", "cufe": "FE0120000000000001000045320260805...", "cafeUrl": "https://pac.example.pa/cafe/FE01200000...", "qrUrl": "https://pac.example.pa/qr/FE01200000...", "cufeReferencia": "FE0120000000000001000012320260805...", "total": 1120.5, "itbms": 70.5}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-sfep-prod", "nota": { "tipo": "04", "referencia": { "cufe": "FE0120000000000001000012320260805..." }, "receptor": { "ruc": "8-888-8888", "dv": "77", "nombre": "Consumidor Final" }, "items": [ { "descripcion": "Service return", "cantidad": 1, "precioUnitario": 1050, "tasaItbms": "01" } ] }}- If
notais not sent in the configuration, the node uses the full object received indataas the note. - The node rejects the request if
tipois not 04 or 05, ifitemsis empty, or ifreferencia.cufe(ornumeroDocumento) of the origin FE is missing. - The returned
cufeidentifies the note itself, not the referenced FE: save it separately if you need to cancel or represent the note later. - ITBMS is calculated at 7%, same as the origin invoice.
Related Nodes
Section titled “Related Nodes”- SfepEmitirFactura - Issue the origin invoice
- SfepAnular - Cancel an already authorized FE or note
- SfepRepresentacion - Generate the printable representation (CAFE) with QR