Skip to content

Releases: igorgbr/pix_brcode

v0.2.0

Choose a tag to compare

@igorgbr igorgbr released this 13 Oct 14:49

Tolerant key parsing, alphanumeric CNPJ and typespecs.

  • Formatted Pix keys are accepted and written in the DICT canonical form:
    123.456.789-09 → 12345678909, +55 (11) 98765-4321 → +5511987654321,
    Fulano@Exemplo.com → fulano@exemplo.com
  • Alphanumeric CNPJ keys (Receita, from July 2026): 12.ABC.345/01DE-35 → 12ABC34501DE35
  • New :key_type option (:cpf, :cnpj, :phone, :email, :evp)
  • @spec and @type for the whole public API
  • Invalid UTF-8 input now returns {:error, _} instead of raising

Breaking: encode/1 now validates CPF/CNPJ check digits, so keys like "12345678901" return {:error, :invalid_key}. A +55 phone key needs a DDD and 8 or 9 digits.

Full list in the CHANGELOG.

Hex: https://hex.pm/packages/pix_brcode/0.2.0

First release

Choose a tag to compare

@igorgbr igorgbr released this 27 Sep 17:15

First release.

  • Generate static and dynamic Pix payloads (BR Code)
  • Parse any payload into a struct, validating CRC, structure and GUI
  • Validate Pix key formats (CPF, CNPJ, phone, e-mail, random key)
  • Zero runtime dependencies

Tested end to end: a payload generated by the library was paid from Nubank and received at Itaú; payloads generated by both banks' apps are parsed correctly.

Hex: https://hex.pm/packages/pix_brcode