Skip to content

FacturamaDescargar

Downloads the XML (for fiscal archiving) or PDF (to send to the customer) of a CFDI registered in Facturama. Content is returned in base64, ready to save to storage, send by email, or attach to other systems.

FieldTypeRequiredDescription
credentials_idcredentialsYesFacturama account credentials
cfdi_idtextYesFacturama internal CFDI ID
formatselectNoFormat: ‘pdf’ (default) or ‘xml’
cfdi_typeselectNo’issued’ (default) or ‘received’
{
"success": true,
"cfdi_id": "abc123def456",
"format": "pdf",
"content": "JVBERi0xLjQg...",
"content_type": "application/pdf",
"filename": "abc123def456.pdf",
"raw": { ... }
}

The content field is the file encoded in base64.

{
"credentials_id": "cred-facturama-prod",
"cfdi_id": "abc123def456",
"format": "pdf"
}
{
"credentials_id": "cred-facturama-prod",
"cfdi_id": "abc123def456",
"format": "xml"
}
  1. FacturamaCFDI — issue CFDI → gets cfdi_id
  2. FacturamaDescargar — download PDF in base64
  3. SendMail — attach the PDF to the customer’s email
  • The base64 content can be used directly with the SendMail node as an attachment
  • To save to S3/GCS, convert the base64 to a buffer before uploading
  • The signed XML is the legally valid fiscal document with the SAT