Chirola
Electronic invoicing against Argentina's tax authority, as an API
Role: Creator & Developer
Rol: Creador y Desarrollador
Overview
A billing backend that talks to ARCA (formerly AFIP) so nobody else has to: A/B/C invoices, credit and debit notes, each one returning its CAE. It is multi-tenant by design — every taxpayer keeps its own CUIT and digital certificate in an encrypted vault, and every API consumer is scoped to the taxpayers it is allowed to invoice for. It is the fiscal backend behind Respondi's billing agent.
The Challenge
Invoicing in Argentina means SOAP web services, X.509 certificates, short-lived auth tickets, and a validation model that rejects a whole invoice over a rounding difference. Any product that wants to invoice ends up reimplementing all of it — and, worse, handling somebody else's private key.
The Approach
Built it as a NestJS service with Prisma and Postgres, in a pnpm monorepo with Zod contracts shared across packages. The certificate vault is encrypted with a key that lives only in the deployment environment, and the schema models issuers, API consumers, and the grants between them as first-class entities instead of configuration.
The Outcome
Running in production with push-to-deploy and migrations applied on every release, reachable only from inside the private network — its single consumer today is Respondi's billing agent. A mobile app for the taxpayer side is the next step.