PagoMovilOCR
Open Source / npm Packagenpm library that extracts, normalizes and validates Venezuelan Pago Móvil receipts via OCR.
Problem
In Venezuela, confirming a Pago Móvil payment usually means asking the customer for a screenshot and reading it by hand (amount, reference, date, bank), which is slow, error-prone, and doesn't scale for a business processing many payments a day.
Solution
PagoMovilOCR automates that reading: it takes an image of the receipt and returns structured data along with a set of consistency validations, with no backend of its own and without ever sending the image to a server.
Engineering
- Designed a 4-stage pipeline, each independently testable: OCR → normalization → parsing → validation.
- Implemented a swappable OCR engine (Tesseract.js by default, running 100% client-side/locally via WebAssembly).
- Built a registrable bank-profile system (`registerBankProfile`) to detect, and when it's safe, parse each bank's format.
- Developed a USD/VES conversion module using the official BCV rate (via pydolarve.org), with a configurable in-memory cache and explicit `stale` handling.
- Covered all the logic with unit and integration tests in Vitest: normalization, parsers, individual validators, the currency module with mocked providers, and end-to-end `verifyPayment` with a mocked OCR engine.
