// the find
thalesog/pix-utils
Set of tools to parse, generate and validate payments of Brazil Instant Payment System (Pix) in Javascript
TypeScript library for generating, parsing, and validating Brazilian Pix instant payment QR codes (EMV/BRCode format). Handles both static (fixed-key) and dynamic (URL-based) payment types. If you're building a Brazilian fintech app or accepting Pix payments in a JS/TS stack, this saves you from reading BACEN's EMV spec yourself.
CRC-16/CCITT checksum validation is implemented correctly — this is the part everyone gets wrong. The error handling design (returns a typed error object by default, throws only on request) is the right call for payment code: explicit over explosive. Types are well-structured across separate files per domain concept. CI pipeline runs tests on PRs and automates releases via semantic-release.
No support for parsing dynamic Pix URLs to retrieve payment details — it generates the BRCode with the URL but stops there, so dynamic payments are half-done. The QR code image generation pulls in a qrcode dependency that bloats the package for consumers who only need BRCode strings. Last meaningful activity looks thin; 93 stars and 16 forks after years suggests it's not widely battle-tested in production. No mention of handling the 25-character city truncation edge case that bites people with long city names.