Skip to content

FactusCreateInvoice

Creates and validates an electronic invoice with Colombia’s DIAN through the Factus API. The node returns the CUFE (Código Único de Factura Electrónica) and QR code required by Colombian regulations.

FieldTypeRequiredDescription
credentials_idcredentialsYesFactus OAuth2 credentials
numbering_range_idnumberYesDIAN numbering range ID configured in Factus
payment_method_codeselectNoPayment method: 10=Cash, 42=Bank transfer (default: 10)
reference_codetextNoInternal reference code (order, purchase order)
observationtextNoInvoice notes or description
customerobjectYesJSON object with customer data
itemsarrayYesJSON array with invoice items

Requires a factus credential type with:

  • Client ID: OAuth2 Client ID from the Factus dashboard API section
  • Client Secret: OAuth2 Client Secret
  • Environment: sandbox (testing) or production (real DIAN)
{
"identification": "900123456",
"dv": "7",
"company": "Client Company S.A.S.",
"trade_name": "Client Company",
"names": "John Doe",
"address": "Calle 1 # 2-3, Bogotá",
"email": "client@company.com",
"phone": "3001234567",
"legal_organization_id": "1",
"tribute_id": "21",
"identification_document_id": "31",
"municipality_id": "149"
}

Common values:

  • legal_organization_id: 1=Legal entity, 2=Individual
  • tribute_id: 21=VAT responsible, 22=Not VAT responsible
  • identification_document_id: 31=NIT, 13=National ID
  • municipality_id: Factus internal code (149=Bogotá)
[
{
"code_reference": "SERV-001",
"name": "Software development service",
"quantity": 1,
"discount_rate": 0,
"price": 1000000,
"tax_rate": "19.00",
"unit_measure_id": 70,
"standard_code_id": 1,
"is_excluded": 0
}
]
{
"success": true,
"bill_id": "123",
"bill_number": "FE-001",
"cufe": "abc123...hash256",
"qr_code": "https://...",
"status": "Accepted",
"raw": { ... }
}
{
"credentials_id": "cred-factus-prod",
"numbering_range_id": "1",
"payment_method_code": "42",
"reference_code": "PO-2025-001",
"customer": {
"identification": "900123456",
"dv": "7",
"company": "Client S.A.S.",
"email": "admin@client.com",
"legal_organization_id": "1",
"tribute_id": "21",
"identification_document_id": "31",
"municipality_id": "149"
},
"items": [
{
"name": "Technical consulting",
"quantity": 8,
"price": 200000,
"tax_rate": "19.00",
"unit_measure_id": 70,
"standard_code_id": 1,
"is_excluded": 0
}
]
}
  • numbering_range_id corresponds to the DIAN resolution enabled in the Factus dashboard
  • Authentication uses OAuth2 client_credentials; the token is refreshed automatically
  • The CUFE is the unique identifier of the invoice with the DIAN — store it for future queries
  • If DIAN rejects the invoice, Factus returns HTTP 422 with the rejection reasons