Skip to main content

Overview

Quetzal Invoicing is a single REST API for emitting fiscal documents — invoices, credit notes, debit notes, payment complements, and cancellations — against Latin American tax authorities. It abstracts away the per-country differences (DIAN in Colombia, SAT in Mexico, SRI in Ecuador, SUNAT in Peru) behind one resource shape: the Document.

POST /v1/documents

You send Quetzal a document with an issuer, a receiver, some line_items, and a country. Quetzal handles the rest: building the country-specific payload (CFDI, UBL, XML), authenticating against the tax authority, retrying transient failures, and surfacing the final fiscal ID back to you.

What's in the API

Six resources cover the full surface:

ResourceEndpointRole
Documents/v1/documentsFiscal documents — the primary resource. Has a state machine (DRAFT → PENDING_SUBMISSION → EMITTED, plus FAILED / CANCELLED branches).
Parties/v1/partiesIssuers and receivers — anybody who appears as a tax counterparty. Reusable across documents.
Issuer Profiles/v1/issuer_profilesA tenant's fiscal identity per country (certificate, numerator range, regulatory metadata).
Webhook Subscriptions/v1/webhook_subscriptionsEndpoints Quetzal calls when a document changes state.
FacturaGreen Webhooks/v1/webhooks/factura_greenInbound endpoint for the MX provider — internal, not for direct caller use.
Health/v1/healthLiveness probe.

What it covers today

CountryAuthorityDocument types validated in production
🇨🇴 ColombiaDIANInvoice, credit note, debit note, cancellation
🇲🇽 MexicoSATInvoice, payment complement (CFDI), cancellation
🇪🇨 EcuadorSRIInvoice, credit note
🇵🇪 PeruSUNATInvoice

Per-country requirements (folios, certificates, address codes) live in the country_specific field on every request. See Country specifics in the API Reference for the per-country shape.

Where to go next

What Quetzal does NOT do

To set expectations:

  • It is not an accounting system. Quetzal records emitted documents; ledger, reconciliation, and reporting live elsewhere.
  • It is not a payment gateway. Payment complements record that a payment happened — Quetzal does not collect, route, or settle funds.
  • It is not a billing engine for end customers. Quetzal accepts ready-to-emit documents; the caller decides when and what to invoice.

In short: you compute the line items, Quetzal makes them legally fiscal.