{"id":21509988,"url":"https://github.com/fonini/go-pix","last_synced_at":"2025-04-09T12:08:16.405Z","repository":{"id":41832975,"uuid":"342743351","full_name":"fonini/go-pix","owner":"fonini","description":"go-pix is a Go library for generating Pix Copy and Paste or QR codes. 💳 💰","archived":false,"fork":false,"pushed_at":"2025-02-24T21:20:32.000Z","size":48,"stargazers_count":80,"open_issues_count":2,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-02T11:01:59.149Z","etag":null,"topics":["brazil","brcode","go","go-modules","golang","hacktoberfest","library","money"],"latest_commit_sha":null,"homepage":"","language":"Go","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/fonini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-02-27T01:28:59.000Z","updated_at":"2025-03-24T18:32:10.000Z","dependencies_parsed_at":"2023-10-12T21:23:38.210Z","dependency_job_id":"b668fbbb-ae5d-4e60-98f5-1b98b13882ec","html_url":"https://github.com/fonini/go-pix","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonini%2Fgo-pix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonini%2Fgo-pix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonini%2Fgo-pix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonini%2Fgo-pix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fonini","download_url":"https://codeload.github.com/fonini/go-pix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036067,"owners_count":21037092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["brazil","brcode","go","go-modules","golang","hacktoberfest","library","money"],"created_at":"2024-11-23T21:35:47.781Z","updated_at":"2025-04-09T12:08:16.381Z","avatar_url":"https://github.com/fonini.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-pix\n\n[![GoDoc](https://pkg.go.dev/badge/github.com/fonini/go-pix)](https://pkg.go.dev/github.com/fonini/go-pix/pix)\n[![Test Status](https://github.com/fonini/go-pix/workflows/tests/badge.svg)](https://github.com/fonini/go-pix/actions?query=workflow%3Atests)\n[![codecov](https://codecov.io/gh/fonini/go-pix/branch/main/graph/badge.svg?token=9RNR32U66L\u0026force=true)](https://codecov.io/gh/fonini/go-pix)\n[![Go Report Card](https://goreportcard.com/badge/github.com/fonini/go-pix?force=true)](https://goreportcard.com/report/github.com/fonini/go-pix)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\ngo-pix is a Go library for generating [Pix](https://www.bcb.gov.br/estabilidadefinanceira/pix) transactions using Copy and Paste or QR codes.\n\n## About Pix\n\n![Generated QR code](pix.png?raw=true)\n\nPix is a system created by the Brazilian Central Bank to allow instant payments. The new payment method allows immediate money transfer, 24 hours a day, 7 days a week, including weekends and holidays.\n\nThe address key is a way to identify the user’s account. There are four types of address keys that users can use:\n\n* CPF/CNPJ\n* Email address\n* Cellphone number\n* Random key – a set of random number, letters, and symbols\n\nThis key binds the basic information to the user’s complete account information, allowing users to send and receive money using only an address key.\n\n## Usage\n\n```go\nimport \"github.com/fonini/go-pix/pix\"\n```\n\n### Generating a Copy and Paste code\n\n```go\noptions := pix.Options{\n    Name: \"Jonnas Fonini\",\n    Key: \"jonnasfonini@gmail.com\",\n    City: \"Marau\",\n    Amount: 20.67, // optional\n    Description: \"Invoice #4\", // optional\n    TransactionID: \"***\", // optional\n}\n\ncopyPaste, err := pix.Pix(options)\n\nif err != nil {\n    panic(err)\n}\n\nfmt.Println(copyPaste) // will output: \"00020126580014BR.GOV.BCB.PIX0122jonnasfonini@gmail.com0210Invoice #4520400005303986540520.675802BR5913Jonnas Fonini6005Marau62410503***50300017BR.GOV.BCB.BRCODE01051.0.06304CF13\"\n\noptionsFromCode, err := pix.ReadPix(copyPaste)\nif err != nil {\n    panic(err)\n}\n\nfmt.Println(optionsFromCode)\n```\n\n### Generating a QR code from a Copy and Paste code\n\nYou can use the Copy and Paste code generated above to generate a QR code\n\n```go\noptions := QRCodeOptions{Size: 256, Content: copyPaste}\n\nqrCode, err := pix.QRCode(options)\n\nif err != nil {\n    panic(err)\n}\n```\n\nThe ```qrCode``` is a byte array, containing a graphical representation of the Copy and Paste code in the form of a QR code.\n\n![Generated QR code](qr.png?raw=true)\n\n## Banks tested\n* Caixa Econômica Federal\n* Nubank\n* PicPay\n* PagSeguro\n* Itaú\n* Mercado Pago\n\n## Tests\n\n```sh\ngo test ./pix\n```\n\n## License\n\nThis open-sourced software is licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonini%2Fgo-pix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffonini%2Fgo-pix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonini%2Fgo-pix/lists"}