The problem
Issuing an electronic receipt in Peru means generating an XML file in the format required by SUNAT (the tax authority), signing it with a digital certificate, sending it and keeping the response record. For a small business that usually means filling in forms by hand or relying on an outside provider.
The solution
Ebisu is a point-of-sale system with built-in electronic invoicing. The cashier builds the sale, picks the payment method and chooses a receipt, an invoice or nothing. For an invoice, the customer’s details fill in automatically from their tax ID. The document comes out as a PDF or an 80 mm ticket with its QR code.
It runs in the browser, on a computer or a phone. On phones the interface adapts down to 320 px wide, with bottom navigation.
Landing page
To present the product I published ebisu.gabvmon.com (in Spanish), written for owners of corner shops, stores and restaurants rather than technical readers. Instead of screenshots it uses HTML mock-ups of what the business sees every day: a sale with its receipt accepted by SUNAT, the end-of-day cash count, kitchen orders and stock. It explains how to get started in three steps and the price (from S/ 50 a month, setup and training included), and every call to action opens WhatsApp with a pre-written message. It also includes terms of service, a privacy policy and the complaints book required in Peru.

Architecture
Web app (Next.js) → API (NestJS) → PostgreSQL → send queue → SUNAT
Each client gets its own installation with its own database. A central control panel manages the installations without touching anyone’s business data.
Technical decisions
- Direct connection to SUNAT, no middleman. I wrote the module that builds UBL 2.1 XML, signs it (XMLDSig RSA-SHA256), validates it against the 34 official XSD schemas before sending and reads SUNAT’s response record (CDR). It covers invoices, receipts sent in daily summaries, credit and debit notes, voiding notices and shipping guides.
- A queue that survives outages. If SUNAT does not respond, sends are retried over several hours, stuck jobs are recovered and the server can restart without losing anything. Daily summaries are split every 500 lines, and the system warns before the digital certificate expires.
- No double charges or duplicate numbers. The sale is locked while its document is issued, each sale has a single main document and the next series number is taken atomically. A split bill can be paid from two devices without charging twice, and a sale is only voided once SUNAT accepts it.
- Per-client isolation. Instead of one database shared by every client, each one has its own full deployment (Docker Compose). The central panel talks to them through signed configuration and licenses, with replay protection.
Results
In production with several clients. The codebase has more than 1,400 automated tests, and continuous integration runs against a simulated SUNAT.
