FULL CYCLE
Create, issue, collect and correct from your code.
POST /api/v1/facturas creates a draft. Then, on that same invoice, you issue it, email it with the PDF attached, record a full or partial payment, void it or create a credit note. Each action fires its event, so your system can react by webhook.
- Draft first: nothing reaches the tax authority until you issue
- Partial payments capped at the real balance
- invoice.finalized, invoice.paid and invoice.voided as webhooks
POST /api/v1/facturas # draft
{ "cliente_id": "9b41…", "items": [ … ] }
← 200 { "id": "f3a8d1c4-…" }
POST /api/v1/facturas/f3a8… { "action": "finalize" }
← 200 estado_fiscal: "issued" # invoice.finalized
POST /api/v1/facturas/f3a8… { "action": "send" }
← 200 # email with the PDF attached
POST /api/v1/facturas/f3a8… { "action": "payment", "monto": 5000 }
← 200 saldo: 9875.00 # partial payment