E-invoicing case study

Boletura: an e-invoicing engine for Peru

Boletura is the e-invoicing platform for Peru built by Devkora. It issues sales receipts, invoices, and credit and debit notes from a web panel or through an API, signs the XML with each company’s certificate and sends it directly to SUNAT, Peru’s tax authority.

Boletura: list of tax documents in the web panel, using sample data

The problem

Issuing an electronic tax document in Peru means building an XML file with SUNAT’s catalogues, signing it with a digital certificate, sending it, reading the response, meeting different deadlines per document type, preparing daily summaries and reporting voided documents. Doing that by hand takes time, and building it into every system repeats the most delicate part. Boletura brings it all into one piece: a web panel for whoever issues documents and an API for the systems already in place.

What it does

  • Sales receipts, invoices, credit and debit notes

    Issued from the web panel, on a computer or phone, or through the API, with numbering by series and IGV (VAT) calculation. Invoices can be paid in full or on credit, with their instalments and due dates.

  • Signed XML, PDF and QR

    UBL 2.1 XML signed with the company’s certificate, and a printable version in A4 or ticket format with a QR code.

  • Submission and SUNAT receipt

    Direct submission to SUNAT with retries while the deadline allows, the status of each document and its receipt confirmation (CDR).

  • Daily summary and voids

    Sales receipts reported in the daily summary, void notices for invoices and alerts before a deadline expires.

  • API and webhooks

    An API with idempotency and per-environment keys, a public OpenAPI contract, Java and TypeScript SDKs generated from that contract, and signed webhooks that report every status change.

  • Several companies in one account

    Each tax ID has its own branches, series and certificate. Certificates and credentials are stored encrypted and separated by company.

  • Test mode

    An environment separate from production, with no tax validity, to try out issuing and error cases.

  • Public lookup

    A page where anyone who received a document can look it up and download it.

Boletura: invoice detail with its status, SUNAT’s response and downloads, using sample data

How it is built

  • .NET 10 back end and workers with PostgreSQL, and a Next.js web panel with TypeScript, in a modular monolith.
  • API first: the panel and the public lookup use the same capabilities as the API. The OpenAPI contract for version 1 is public.
  • Every submission goes through a queue with retries and reconciliation: if the process is interrupted, effects are not duplicated.
  • Tax rules centralised in our own engine and documented with their source.
  • Two-step verification in the panel, an audit trail of actions and encrypted backups with a tested restore.

About the product

Boletura is a product of Devkora Consulting S.A.C. It is neither a PSE nor an OSE (Peru’s third-party e-invoicing providers): it signs with each company’s certificate and submits directly to SUNAT, through the system SUNAT calls SEE - Del Contribuyente.

Need a similar system?

Tell us which process you want to organise, whether you already use a system and when you need it.

Contact us