FacturamaCFDI
Description
Section titled “Description”Creates and stamps a CFDI (Comprobante Fiscal Digital por Internet) version 4.0 with Mexico’s SAT through Facturama. The node generates the fiscal UUID and signed XML required by Mexican tax regulations.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Facturama account credentials |
| expedition_place | text | Yes | Postal code of the issuer’s tax address |
| payment_form | select | No | SAT payment form (default: 03=Wire transfer) |
| payment_method | select | No | PUE=Single payment, PPD=Partial/deferred (default: PUE) |
| currency | select | No | MXN, USD, EUR (default: MXN) |
| serie | text | No | Invoice series (e.g.: FA) |
| folio | text | No | Folio number (Facturama generates if not specified) |
| observations | text | No | Invoice observations |
| receiver | object | Yes | JSON object with receiver data |
| items | array | Yes | JSON array with CFDI line items |
Credentials
Section titled “Credentials”Requires a facturama credential type with:
- Username: facturama.mx account username
- Password: account password
- Environment:
sandbox(testing) orproduction(real SAT)
Receiver object
Section titled “Receiver object”{ "Rfc": "XAXX010101000", "Name": "PÚBLICO EN GENERAL", "CfdiUse": "S01", "FiscalRegime": "616", "TaxZipCode": "06600"}Common values:
CfdiUse: S01=No fiscal effects, G01=Goods acquisition, G03=General expensesFiscalRegime: 601=General Law, 616=No tax obligations
For public/anonymous customers use RFC XAXX010101000 and regime 616.
Items array
Section titled “Items array”[ { "ProductCode": "81112100", "IdentificationNumber": "SERV-001", "Description": "Software development service", "Unit": "Activity", "UnitCode": "E48", "UnitPrice": 1000.00, "Quantity": 1, "Subtotal": 1000.00, "Taxes": [ { "Total": 160.00, "Name": "IVA", "Base": 1000.00, "Rate": 0.16, "IsRetention": false } ], "Total": 1160.00 }]ProductCode uses the SAT product/service catalog codes.
Output
Section titled “Output”{ "success": true, "cfdi_id": "abc123def456", "uuid": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "serie": "FA", "folio": "1001", "status": "active", "raw": { ... }}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-facturama-prod", "expedition_place": "06600", "serie": "FA", "payment_form": "03", "payment_method": "PUE", "currency": "MXN", "receiver": { "Rfc": "ABCD900101XXX", "Name": "Client Company SA de CV", "CfdiUse": "G03", "FiscalRegime": "601", "TaxZipCode": "64000" }, "items": [ { "ProductCode": "81112100", "Description": "IT consulting", "Unit": "Activity", "UnitCode": "E48", "UnitPrice": 5000.00, "Quantity": 1, "Subtotal": 5000.00, "Taxes": [{ "Total": 800.00, "Name": "IVA", "Base": 5000.00, "Rate": 0.16, "IsRetention": false }], "Total": 5800.00 } ]}- The UUID is the unique SAT identifier — store it for cancellations and downloads
- Authentication is HTTP Basic (facturama.mx username and password)
- In sandbox, invoices have no fiscal validity but are useful for integration testing
Related Nodes
Section titled “Related Nodes”- FacturamaCancelar - Cancel a CFDI
- FacturamaDescargar - Download XML or PDF