cufeav2.1
DIAN Technical Annex UBL 2.1Fiscal infrastructure →

Electronic invoicing for developers

Send clean JSON, get signed UBL 2.1 XML, pre-validation and the CUFE in milliseconds. Built for teams shipping modern software in Colombia.

$npm install @cufea/sdkcontent_copy

Built for the modern production stack

polyline Next.js
javascript Node.js
terminal Python
code_blocks Laravel
data_array Go
bolt Supabase
database PostgreSQL
Instant integration

One REST call. The DIAN standard, solved.

TypeScriptPythoncURLGo
factura.ts
POST /v1/invoices
import { CufeaClient } from '@cufea/sdk';

// Inicializar cliente con clave de Sandbox o Producción
const cufea = new CufeaClient({ apiKey: process.env.CUFEA_KEY });

// Generar factura electrónica, firma X.509 y validación DIAN
const invoice = await cufea.invoices.create({
  idempotencyKey: 'order_98014',
  prefix: 'SETT',
  number: 10924,
  customer: {
    legalName: 'Acme Colombia S.A.S.',
    nit: '901.428.119-3',
    email: 'contabilidad@acme.co'
  },
  items: [{
    sku: 'INFRA-NODE-01',
    description: 'Cufea Enterprise Cluster BOG1',
    quantity: 1,
    price: 4500000.00,
    taxRate: 0.19 // IVA 19%
  }]
});
DIAN Gateway latency: ~165msplay_arrowRun call
201 CREATEDDIAN Status 00
verifiedPre-validated
{
  "id": "inv_98014aef9b22",
  "status": "dian_validated",
  "cufe": "fe8071a9c3d4e5f012bca768d90e2105432ab194...",
  "dian_response": {
    "status_code": "00",
    "message": "Aprobado y emitido con éxito",
    "track_id": "c9f131a4-9290-410a"
  },
  "artifacts": {
    "xml_url": "https://vault.cufea.co/xml/inv_98014.xml",
    "pdf_url": "https://vault.cufea.co/pdf/inv_98014.pdf"
  }
}
NewCufea MCP

Fiscal infrastructure,
ready for AI agents.

An MCP server wired to the DIAN and the Cufea API. Pick your agent and connect it in one click — issue, validate and query electronic documents without building UBL payloads by hand.

Pick your agent
Set up the Cufea MCP server in Claude:

claude mcp add --transport http cufea \
  https://mcp.cufea.com/co \
  --header "Authorization: Bearer <token>"

Use my Cufea token (it's in the CUFEA_TOKEN variable) and, once done, confirm the cufea tools are available.
Designed for scale

First-class developer experience

The DIAN shouldn't be a headache. We built the exact primitives your team needs so you never babysit broken XML.

sync_saved_locally

Native idempotency

Prevents duplicate invoicing on transient network failures or double-clicked payment flows. Cufea deduplicates requests automatically at the edge.

Idempotency-Key: ik_live_79af8c1209b4200 OK (Cache Replay)
webhook

HMAC-signed webhooks

Real-time events with invoice.dian_approved and a cryptographic signature you verify with your secret.

Automatic retries
qr_code_2

PDF & QR at the edge (<80ms)

Ultra-fast vectorial rendering of regulatory representations, no heavy Chromium backends slowing your stack down.

Native vector SVG
terminal

Deterministic sandbox

Test edge cases, tax rejections and state-server failures without issuing real legal invoices or using your digital certificate.

100% isolated environment
lock

Immutable UBL 2.1 vault

Mandatory 5-year legal custody under AES-256 at rest with cryptographic traceability and direct tax auditing.

Art. 684-2 Tax Statute
Workflow

Integrate in 5 minutes

Designed to sit next to your existing stack without touching your internal database logic or your frontend.

01. AUTHENTICATION
Initialize the SDK

Configure your secure sandbox or production credentials in a single line.

02. ISSUANCE
POST /v1/invoices

Send items and fiscal data. Cufea compiles and signs the UBL 2.1 XML.

03. ASYNC
Webhooks & events

Receive DIAN pre-validation and the CUFE on your own infrastructure.

client.ts
content_copy Copiar
import { CufeaClient } from '@cufea/sdk';

export const cufea = new CufeaClient({
  apiKey: process.env.CUFEA_SECRET_KEY!,
  environment: 'sandbox', // 'sandbox' | 'production'
  timeoutMs: 5000
});

// Comprobar conectividad directa con el Gateway DIAN
const { status, dianGateway } = await cufea.ping();
console.log(`Cufea: ${status} | DIAN: ${dianGateway}`);
Unlimited sandbox environment

Start issuing in minutes

No commercial contracts, no slow paperwork. Generate your test keys instantly and validate your first UBL 2.1 documents today.

✓ 5,000 free test invoices•No credit card•Direct support