Developer builds Elixir Pix payment library, validates it with a real one-cent transaction

A developer built pix_brcode, an open-source Elixir library for generating and parsing Brazil's Pix instant payment QR codes, after finding no maintained equivalent on Hex, Elixir's package manager. Pix, launched by Brazil's Central Bank in 2020, is a free, real-time payment system widely used across the country, with codes based on the EMVCo TLV (Tag-Length-Value) format plus a CRC16 checksum. The library was built over a weekend and deliberately avoids external dependencies, including a hand-written CRC16 implementation to keep the package self-contained. To handle money accurately, the library accepts amounts as integer cents or exact strings rather than floating-point numbers, avoiding classic precision errors. The developer verified the library works in production by successfully completing a real R$0.01 Pix transaction, uncovering and fixing a bug that only surfaced when an actual bank was involved.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in