{"id":21348336,"url":"https://github.com/haraj-backend/zatca-sdk-go","last_synced_at":"2025-07-12T17:32:25.104Z","repository":{"id":45602732,"uuid":"434116870","full_name":"Haraj-backend/zatca-sdk-go","owner":"Haraj-backend","description":"An unofficial package in Golang to help developers implement ZATCA (Fatoora) QR code easily.","archived":false,"fork":false,"pushed_at":"2021-12-06T05:12:14.000Z","size":24,"stargazers_count":19,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T23:12:32.915Z","etag":null,"topics":["e-invoicing","fatoora","go","golang","qr-code","qrcode","saudi-arabia","sdk-go","zatca"],"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/Haraj-backend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-02T07:06:02.000Z","updated_at":"2023-09-27T12:26:39.000Z","dependencies_parsed_at":"2022-09-04T21:02:37.904Z","dependency_job_id":null,"html_url":"https://github.com/Haraj-backend/zatca-sdk-go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Haraj-backend/zatca-sdk-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haraj-backend%2Fzatca-sdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haraj-backend%2Fzatca-sdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haraj-backend%2Fzatca-sdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haraj-backend%2Fzatca-sdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Haraj-backend","download_url":"https://codeload.github.com/Haraj-backend/zatca-sdk-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haraj-backend%2Fzatca-sdk-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265025590,"owners_count":23699778,"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":["e-invoicing","fatoora","go","golang","qr-code","qrcode","saudi-arabia","sdk-go","zatca"],"created_at":"2024-11-22T02:19:21.868Z","updated_at":"2025-07-12T17:32:24.836Z","avatar_url":"https://github.com/Haraj-backend.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zatca SDK GO\n\n[![Build](https://github.com/Haraj-backend/zatca-sdk-go/actions/workflows/build.yml/badge.svg)](https://github.com/Haraj-backend/zatca-sdk-go/actions/workflows/build.yml)\n[![Test](https://github.com/Haraj-backend/zatca-sdk-go/actions/workflows/test.yml/badge.svg)](https://github.com/Haraj-backend/zatca-sdk-go/actions/workflows/test.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Haraj-backend/zatca-sdk-go)](https://goreportcard.com/report/github.com/Haraj-backend/zatca-sdk-go)\n\nAn unofficial package in Golang to help developers to implement ZATCA (Fatoora) QR code easily which required for e-invoicing\n\n\u003e ✅ The hash result has been validated the same as the output from ZATCA's SDK as of 18th November 2021\n\n## Installation\n\n```\ngo get github.com/Haraj-backend/zatca-sdk-go\n```\n\n## Simple Usage\n\n```golang\npackage main\n\nimport (\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/Haraj-backend/zatca-sdk-go/qrcode\"\n)\n\nfunc main() {\n\t// encode data using TLV method to get code hash\n\thash, err := qrcode.EncodeTLV(qrcode.Data{\n\t\tSellerName:      \"Bobs Records\",\n\t\tSellerTaxNumber: \"310122393500003\",\n\t\tTimestamp:       time.Date(2022, 04, 25, 15, 30, 00, 00, time.UTC),\n\t\tInvoiceTotal:    1000,\n\t\tTotalVAT:        150,\n\t})\n\tif err != nil {\n\t\tlog.Fatalf(\"unable to encode TLV due: %v\", err)\n\t}\n\tfmt.Println(\"hash data:\", hash)\n\n\t// decode hash using TLV method to get data\n\tdata, err := qrcode.DecodeTLV(hash)\n\tif err != nil {\n\t\tlog.Fatalf(\"unable to decode TLV due: %v\", err)\n\t}\n\tfmt.Printf(\"decoded hash: %s\", data)\n}\n```\n\n## Generating QR Code\n\nThis package is only used for encoding QR Code data into base64 hash using TLV method. So it doesn't contain functionality to generate QR Code image.\n\nIf you want to generate the QR Code image, you could use another library such as [skip2/go-qrcode](https://github.com/skip2/go-qrcode). You could check [examples/qrcode_generator](./examples/qrcode_generator) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharaj-backend%2Fzatca-sdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharaj-backend%2Fzatca-sdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharaj-backend%2Fzatca-sdk-go/lists"}