Skip to content

FacturamaCFDI

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.

FieldTypeRequiredDescription
credentials_idcredentialsYesFacturama account credentials
expedition_placetextYesPostal code of the issuer’s tax address
payment_formselectNoSAT payment form (default: 03=Wire transfer)
payment_methodselectNoPUE=Single payment, PPD=Partial/deferred (default: PUE)
currencyselectNoMXN, USD, EUR (default: MXN)
serietextNoInvoice series (e.g.: FA)
foliotextNoFolio number (Facturama generates if not specified)
observationstextNoInvoice observations
receiverobjectYesJSON object with receiver data
itemsarrayYesJSON array with CFDI line items

Requires a facturama credential type with:

  • Username: facturama.mx account username
  • Password: account password
  • Environment: sandbox (testing) or production (real SAT)
{
"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 expenses
  • FiscalRegime: 601=General Law, 616=No tax obligations

For public/anonymous customers use RFC XAXX010101000 and regime 616.

[
{
"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.

{
"success": true,
"cfdi_id": "abc123def456",
"uuid": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"serie": "FA",
"folio": "1001",
"status": "active",
"raw": { ... }
}
{
"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