Skip to content

SfepEmitirNota

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.

FieldTypeRequiredDescription
credentials_idcredentialsYesSFEP credential
notajsonNoNote (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

This module requires an sfep credential type (issuer RUC and business name, PAC provider, PAC token/username, optional .p12 certificate, environment).

{
"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
}
{
"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 nota is not sent in the configuration, the node uses the full object received in data as the note.
  • The node rejects the request if tipo is not 04 or 05, if items is empty, or if referencia.cufe (or numeroDocumento) of the origin FE is missing.
  • The returned cufe identifies 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.