{"id":16222508,"url":"https://github.com/schoero/swissqrbill","last_synced_at":"2025-10-09T17:33:47.573Z","repository":{"id":38065563,"uuid":"244027101","full_name":"schoero/swissqrbill","owner":"schoero","description":"Swiss QR Bill generation in Node.js and browsers","archived":false,"fork":false,"pushed_at":"2025-06-05T07:08:01.000Z","size":12554,"stargazers_count":214,"open_issues_count":0,"forks_count":28,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-10-09T17:33:40.247Z","etag":null,"topics":["invoice","qr-bill","qr-facture","qr-fattura","qr-invoice","qr-rechnung","rechnung","swiss-qr-bill","swissqrbill","switzerland"],"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/schoero.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":"FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["schoero"]}},"created_at":"2020-02-29T19:15:30.000Z","updated_at":"2025-10-09T09:53:54.000Z","dependencies_parsed_at":"2023-11-07T02:23:30.703Z","dependency_job_id":"fb6d0100-5a32-4379-9ef4-9ae12594f18a","html_url":"https://github.com/schoero/swissqrbill","commit_stats":{"total_commits":996,"total_committers":14,"mean_commits":71.14285714285714,"dds":"0.31526104417670686","last_synced_commit":"5572c2e9ba6b3162348a301ee71cf91a0a296051"},"previous_names":["rogerrrrrrrs/swissqrbill"],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/schoero/swissqrbill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schoero%2Fswissqrbill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schoero%2Fswissqrbill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schoero%2Fswissqrbill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schoero%2Fswissqrbill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schoero","download_url":"https://codeload.github.com/schoero/swissqrbill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schoero%2Fswissqrbill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001865,"owners_count":26083197,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["invoice","qr-bill","qr-facture","qr-fattura","qr-invoice","qr-rechnung","rechnung","swiss-qr-bill","swissqrbill","switzerland"],"created_at":"2024-10-10T12:14:24.096Z","updated_at":"2025-10-09T17:33:47.567Z","avatar_url":"https://github.com/schoero.png","language":"TypeScript","funding_links":["https://github.com/sponsors/schoero"],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"SwissQRBill\" src=\"https://raw.githubusercontent.com/schoero/swissqrbill/main/assets/swissqrbill-logo.svg\"\u003e\n\u003c/div\u003e\n\n---\n\u003cdiv align=\"center\"\u003e\n\n  [![GitHub license](https://img.shields.io/github/license/schoero/swissqrbill?style=flat-square\u0026labelColor=454c5c\u0026color=00AD51)](https://github.com/schoero/swissqrbill/blob/main/LICENSE)\n  [![npm version](https://img.shields.io/npm/v/swissqrbill?style=flat-square\u0026labelColor=454c5c\u0026color=00AD51)](https://www.npmjs.com/package/swissqrbill?activeTab=versions)\n  [![GitHub issues](https://img.shields.io/github/issues/schoero/swissqrbill?style=flat-square\u0026labelColor=454c5c\u0026color=00AD51)](https://github.com/schoero/swissqrbill/issues)\n  [![npm weekly downloads](https://img.shields.io/npm/dw/swissqrbill?style=flat-square\u0026labelColor=454c5c\u0026color=00AD51)](https://www.npmjs.com/package/swissqrbill?activeTab=readme)\n  [![GitHub repo stars](https://img.shields.io/github/stars/schoero/swissqrbill?style=flat-square\u0026labelColor=454c5c\u0026color=00AD51)](https://github.com/schoero/swissqrbill/stargazers)\n  [![GitHub workflow status](https://img.shields.io/github/actions/workflow/status/schoero/swissqrbill/ci.yml?event=push\u0026style=flat-square\u0026labelColor=454c5c\u0026color=00AD51)](https://github.com/schoero/swissqrbill/actions?query=workflow%3ACI)\n\n\u003c/div\u003e\n\n---\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\nWith SwissQRBill you can easily generate the new QR Code payment slips as a PDF or SVG in Node.js and the browser. The new QR Code payment slips were introduced in Switzerland on June 30th, 2020 and replaces the old payment slips since October 1st, 2022. In addition to the payment section, you can [generate a complete invoice](#creating-a-complete-invoice) with [PDFKit][pdfkit-npm] by inserting your own content above the payment section.\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n![QR bill](assets/qr-bill.png)\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n  \u003ca href=\"https://github.com/sponsors/schoero\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./assets/sponsor-dark.svg\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./assets/sponsor-light.svg\"\u003e\n      \u003cimg alt=\"eslint-plugin-readable-tailwind logo\" src=\"./assets/sponsor-dark.svg\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n  \n  Invoices are a critical part of every business. Keeping this library up-to-date with the extensive specifications takes  time and effort.  \n  If this library has been valuable to you, please consider becoming a sponsor, or make a one time donation to support its ongoing development.\n\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## Links\n\n* [Features](#features)\n* [Installation](#installation)\n* [Importing the library][importing-documentation]\n* [Quick start](#quick-start)\n* [API documentation](./docs)\n* [PDFKit documentation][pdfkit-documentation]\n* [Migration from v3 to v4](./docs/migration-v3-to-v4.md)\n* [How to create a complete qr bill][how-to-create-a-complete-qr-bill]\n* [QR bill validator](https://swiss-qr-invoice.org/validator/?lang=de)\n* [QR bill specifications](https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.3-en.pdf)\n* [QR bill style guide](https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/style-guide-qr-bill-en.pdf)\n\n\u003cbr/\u003e\n\n## Features\n\n* Generate complete invoices, or only the QR Bill, as a PDF file.\n* Generate the QR Bill as a scalable vector graphic (SVG).\n* Works in browsers and Node.js.\n* Supports german, english, italian and french invoices.\n* Allows you to add other content above the invoice using [PDFKit][pdfkit-github].\n* Easy to use.\n* Free and open source.\n\n\u003cbr/\u003e\n\n## Installation\n\n```sh\nnpm i swissqrbill\n```\n\n\u003cbr/\u003e\n\n## Importing the library\n\nSwissQRBill is based around [PDFKit][pdfkit-npm]. Depending on the environment you are using, you may need to import the libraries differently. Please read the [importing documentation][importing-documentation] to find out the best way to import the libraries for your environment.\n\n\u003cbr/\u003e\n\n## Quick start\n\nOnce you have imported SwissQRBill and PDFKit, it is quite easy to create a simple QR bill. All you have to do is to create a new [`SwissQRBill`][SwissQRBill] instance with your billing data object. You can then attach the QR bill to any PDFKit document.\n\n```js\nimport { createWriteStream } from \"node:fs\";\n\nimport PDFDocument from \"pdfkit\";\nimport { SwissQRBill } from \"swissqrbill/pdf\";\n\nconst data = {\n  amount: 1994.75,\n  creditor: {\n    account: \"CH44 3199 9123 0008 8901 2\",\n    address: \"Musterstrasse\",\n    buildingNumber: 7,\n    city: \"Musterstadt\",\n    country: \"CH\",\n    name: \"SwissQRBill\",\n    zip: 1234\n  },\n  currency: \"CHF\",\n  debtor: {\n    address: \"Musterstrasse\",\n    buildingNumber: 1,\n    city: \"Musterstadt\",\n    country: \"CH\",\n    name: \"Peter Muster\",\n    zip: 1234\n  },\n  reference: \"21 00000 00003 13947 14300 09017\"\n};\n\nconst pdf = new PDFDocument({ size: \"A4\" });\nconst qrBill = new SwissQRBill(data);\n\nconst stream = createWriteStream(\"qr-bill.pdf\");\n\nqrBill.attachTo(pdf);\npdf.pipe(stream);\npdf.end();\n```\n\nThis will create the PDF file above. You can pass an optional parameter containing options to the [`SwissQRBill constructor`][SwissQRBill-constructor].\nA complete documentation for all methods and parameters can be found in the [docs/][repository-docs] directory of this repository.\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\nAlternatively, you could render the QR Bill as a scalable vector graphic (SVG). But keep in mind, using SVG you can only render the QR Bill part and not an entire invoice.\n\n```js\nimport { SwissQRBill } from \"swissqrbill/svg\";\n\nconst svg = new SwissQRBill(data);\n\ndocument.body.appendChild(svg.element);\n```\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## Creating a complete invoice\n\nIt is possible to create a complete invoice with SwissQRBill. This means that you can add your own content above the QR Bill.\n\nSwissQRBill is based around [PDFKit][pdfkit-github] to generate the PDF files. You can use all the features of PDFKit to add your own content to the PDF file.\n\nThe documentation for PDFKit can be found on [pdfkit.org][pdfkit-documentation].\n\nA simple guide how to generate a complete bill can be found in [docs/how-to-create-a-complete-qr-bill.md][how-to-create-a-complete-qr-bill]. You will learn how to create a PDF that looks like this:\n\n\u003cbr/\u003e\n\n![Complete QR bill](assets/complete-qr-bill.png)\n\n[SwissQRBill]: ./docs/pdf/index.md#class-swissqrbill\n[SwissQRBill-constructor]: ./docs/pdf/index.md#constructor-new-swissqrbilldata-options\n[importing-documentation]: ./docs/importing.md\n[repository-docs]: ./docs/\n[how-to-create-a-complete-qr-bill]: ./docs/how-to-create-a-complete-qr-bill.md\n[pdfkit-documentation]: http://pdfkit.org\n[pdfkit-github]: https://github.com/foliojs/pdfkit\n[pdfkit-npm]: https://www.npmjs.com/package/pdfkit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschoero%2Fswissqrbill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschoero%2Fswissqrbill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschoero%2Fswissqrbill/lists"}