{"id":36894638,"url":"https://github.com/thalesog/pix-utils","last_synced_at":"2026-01-12T15:40:59.805Z","repository":{"id":52494577,"uuid":"369548818","full_name":"thalesog/pix-utils","owner":"thalesog","description":"Set of tools to parse, generate and validate payments of Brazil Instant Payment System (Pix) in Javascript","archived":false,"fork":false,"pushed_at":"2025-08-15T18:48:43.000Z","size":685,"stargazers_count":81,"open_issues_count":5,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-21T10:35:35.290Z","etag":null,"topics":["bacen","emv","emv-qr","emvqr","javascript","pix","pix-copia-e-cola","pix-qrcode","pix-tools","qrcode","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thalesog.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-21T13:44:25.000Z","updated_at":"2025-09-12T12:41:11.000Z","dependencies_parsed_at":"2025-07-05T16:21:47.436Z","dependency_job_id":null,"html_url":"https://github.com/thalesog/pix-utils","commit_stats":{"total_commits":61,"total_committers":4,"mean_commits":15.25,"dds":"0.24590163934426235","last_synced_commit":"6279dd0576cce146c7216ac3f7ff0c24d2a76bed"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/thalesog/pix-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thalesog%2Fpix-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thalesog%2Fpix-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thalesog%2Fpix-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thalesog%2Fpix-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thalesog","download_url":"https://codeload.github.com/thalesog/pix-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thalesog%2Fpix-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bacen","emv","emv-qr","emvqr","javascript","pix","pix-copia-e-cola","pix-qrcode","pix-tools","qrcode","typescript"],"created_at":"2026-01-12T15:40:59.272Z","updated_at":"2026-01-12T15:40:59.798Z","avatar_url":"https://github.com/thalesog.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg alt=\"pix-utils\" src=\"./examples/example-react/public/logo-pix.png\" width=\"128px\" /\u003e\u003c/p\u003e\n\n# \u003cp align=\"center\"\u003ePix-Utils\u003cp\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca\n    href=\"https://github.com/thalesog/pix-utils/blob/master/LICENSE\"\n    target=\"blank\"\n  \u003e\n    \u003cimg\n      src=\"https://img.shields.io/github/license/thalesog/pix-utils?style=for-the-badge\u0026color=blueviolet\"\n      alt=\"License\"\n    /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/thalesog/pix-utils/stargazers\" target=\"blank\"\u003e\n    \u003cimg\n      src=\"https://img.shields.io/github/stars/thalesog/pix-utils?style=for-the-badge\u0026color=blueviolet\"\n      alt=\"Stars\"\n    /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://www.npmjs.com/package/pix-utils\" target=\"_blank\"\u003e\n    \u003cimg\n      src=\"https://img.shields.io/npm/v/pix-utils.svg?style=for-the-badge\u0026color=blueviolet\u0026logo=npm\"\n      alt=\"Version\"\n    /\u003e\n  \u003c/a\u003e\n  \u003ca\n    href=\"https://github.com/thalesog/pix-utils/actions/workflows/release.yaml\"\n  \u003e\n    \u003cimg\n      src=\"https://img.shields.io/github/workflow/status/thalesog/pix-utils/Release?style=for-the-badge\u0026color=blueviolet\u0026logo=GitHub\"\n      alt=\"Build Status\"\n    /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Pix-Utils is a set of tools to parse, generate and validate payments of Brazil Instant Payment System (Pix), making fast and simple to handle charges and proccess then in your project.\n\n# 🚀 Usage\n\n### Install the package in your project\n\n```sh\nyarn add pix-utils\n```\n\n### Create Static Pix\n\n```ts\nimport { createStaticPix, hasError } from 'pix-utils';\n\nconst pix = createStaticPix({\n  merchantName: 'Thales Ogliari',\n  merchantCity: 'Sao Paulo',\n  pixKey: 'nubank@thalesog.com',\n  infoAdicional: 'Gerado por Pix-Utils',\n  transactionAmount: 1,\n});\n\nif (!hasError(pix)) {\n  const brCode = pix.toBRCode();\n  // 00020126650014br.gov.bcb.pix0119nubank@thalesog.com0220Gerado por Pix-Utils52040000530398654041.005802BR5914Thales Ogliari6009Sao Paulo62070503***63046069\n}\n```\n\n### Create Dynamic Pix\n\n```ts\nimport { createDynamicPix, hasError } from 'pix-utils';\n\nconst pix = createDynamicPix({\n  merchantName: 'Thales Ogliari',\n  merchantCity: 'Sao Paulo',\n  url: 'https://pix.thalesogliari.com.br',\n});\n\nif (!hasError(pix)) {\n  const brCode = pix.toBRCode();\n  // 00020126540014br.gov.bcb.pix2532https://pix.thalesogliari.com.br5204000053039865802BR5914Thales Ogliari6009SAO PAULO62070503***63043FD3\n}\n```\n\n### Throw errors\n\nBy default, pix-utils wont throw an error when parsing an invalid pix, but you can enable it by using the `throwIfError` function.\n\n```js\nimport { createDynamicPix } from 'pix-utils';\n\nconst pix = createDynamicPix({\n  merchantName: 'Thales Ogliari',\n  merchantCity: 'Sao Paulo',\n  url: 'https://pix.thalesogliari.com.br',\n}).throwIfError();\n\nconst brCode = pix.toBRCode();\n// 00020126540014br.gov.bcb.pix2532https://pix.thalesogliari.com.br5204000053039865802BR5914Thales Ogliari6009SAO PAULO62070503***63043FD3\n```\n\n### Parse BRCode\n\n```js\nconst pix = parsePix(\n  '00020126650014br.gov.bcb.pix0119nubank@thalesog.com0220Gerado por Pix-Utils52040000530398654041.005802BR5914Thales Ogliari6015SAO MIGUEL DO O62070503***6304059A'\n);\n\n// {\n//   type: 'STATIC',\n//   merchantCategoryCode: '0000',\n//   transactionCurrency: '986',\n//   countryCode: 'BR',\n//   merchantName: 'Thales Ogliari',\n//   merchantCity: 'SAO MIGUEL DO O',\n//   pixKey: 'nubank@thalesog.com',\n//   transactionAmount: 1,\n//   infoAdicional: 'Gerado por Pix-Utils',\n//   txid: '***',\n//   toBRCode: [Function: toBRCode],\n//   toImage: [Function: toImage]\n// }\n```\n\n### Export to Base64 Image\n\n```js\nconst pix = parsePix(\n  '00020126650014br.gov.bcb.pix0119nubank@thalesog.com0220Gerado por Pix-Utils52040000530398654041.005802BR5914Thales Ogliari6015SAO MIGUEL DO O62070503***6304059A'\n);\n\npix.toImage();\n// data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOQAAADkCAYAAACIV4iNAAAAAklEQVR4AewaftIAAAwHSURBVO3BQW4sy7LgQDKh/W...\n```\n\n# 🍰 Contributing\n\nPlease contribute using [GitHub Flow](https://guides.github.com/introduction/flow). Create a branch, add commits, and [open a pull request](https://github.com/thalesog/pix-utils/compare).\n\n# 📝 License\n\nThis project is under [MIT](https://github.com/thalesog/pix-utils/blob/master/LICENSE) license.\n\n#\n\n\u003cp align=\"center\"\u003e\n Developed with 💚 by \u003ca href=\"https://github.com/thalesog\"\u003e@thalesog\u003c/a\u003e 🇧🇷\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthalesog%2Fpix-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthalesog%2Fpix-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthalesog%2Fpix-utils/lists"}