{"id":31589368,"url":"https://github.com/adityavijay21/upiqr","last_synced_at":"2026-04-10T11:32:14.800Z","repository":{"id":316833161,"uuid":"1064605003","full_name":"adityavijay21/upiqr","owner":"adityavijay21","description":"Generate customizable UPI QR codes with a simple API. Supports fixed and variable amounts, transaction notes, and multiple output formats (PNG, SVG).","archived":false,"fork":false,"pushed_at":"2025-09-26T11:05:12.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T02:54:12.137Z","etag":null,"topics":["fintech","india","javascript","nodejs","npm-packages","payments","qrcode","react","react-native","typescript","upi","upi-qr-code","upiqrcode"],"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/adityavijay21.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,"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}},"created_at":"2025-09-26T09:28:17.000Z","updated_at":"2025-09-29T12:45:50.000Z","dependencies_parsed_at":"2025-09-27T02:35:51.892Z","dependency_job_id":"cdb7c4b2-4000-4dd0-bede-6b69b7db6c8c","html_url":"https://github.com/adityavijay21/upiqr","commit_stats":null,"previous_names":["adityavijay21/upiqr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adityavijay21/upiqr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityavijay21%2Fupiqr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityavijay21%2Fupiqr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityavijay21%2Fupiqr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityavijay21%2Fupiqr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adityavijay21","download_url":"https://codeload.github.com/adityavijay21/upiqr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityavijay21%2Fupiqr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31641114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: 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":["fintech","india","javascript","nodejs","npm-packages","payments","qrcode","react","react-native","typescript","upi","upi-qr-code","upiqrcode"],"created_at":"2025-10-06T02:52:13.469Z","updated_at":"2026-04-10T11:32:14.766Z","avatar_url":"https://github.com/adityavijay21.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @adityavijay21/upiqr: UPI QR Code Generator\n\n[![npm version](https://img.shields.io/npm/v/@adityavijay21/upiqr.svg?style=flat-square)](https://www.npmjs.com/package/@adityavijay21/upiqr)\n[![build status](https://img.shields.io/github/actions/workflow/status/adityavijay21/@adityavijay21/upiqr/main.yml?branch=main\u0026style=flat-square)](https://github.com/adityavijay21/@adityavijay21/upiqr/actions/workflows/main.yml)\n[![npm downloads](https://img.shields.io/npm/dt/@adityavijay21/upiqr.svg?style=flat-square)](https://www.npmjs.com/package/@adityavijay21/upiqr)\n[![license](https://img.shields.io/npm/l/@adityavijay21/upiqr.svg?style=flat-square)](https://github.com/adityavijay21/@adityavijay21/upiqr/blob/main/LICENSE)\n\nA lightweight, modern, and customizable UPI QR code generator for Node.js, browsers, and React Native. Generate static and dynamic UPI QR codes with a simple, fluent API.\n\n---\n## 🌐 Live Demo\n\nTest out the package in a live environment! The React demo app we built is a perfect showcase.\n\n**[➡️ Launch the Live Demo](https://your-demo-url.vercel.app/)** _(You can deploy the React demo to a service like Vercel or Netlify to get this link)_\n\n\u003cdiv align=\"center\"\u003e\n  \n\u003c/div\u003e\n\n---\n## ✨ Features\n\n* ✅ **Fluent API:** Easy-to-use, chainable methods for a clean development experience.\n* ✅ **Framework Agnostic:** Works in Node.js, browsers, React, Vue, Svelte, and more.\n* ✅ **React Native Support:** First-class support for React Native via SVG output.\n* ✅ **Flexible Output:** Generate QR codes as Base64 PNGs (`dataURL`), `SVG` strings, or `UTF8` strings.\n* ✅ **Fully Typed:** Written in TypeScript for a great developer experience with autocompletion.\n* ✅ **Easy Installation:** No peer dependencies to manage. It just works.\n\n---\n## ⚙️ How It Works\n\nThe library simplifies the process of creating a valid UPI intent URL and encoding it into a QR code.\n\n`Your Data` ➡️ `UPIQR Class` ➡️ `UPI Intent String` ➡️ **QR Code**\n\n---\n## 📦 Installation\n\n```bash\nnpm install @adityavijay21/upiqr\n````\n\n-----\n\n## 🚀 Usage Examples\n\n### 1\\. Basic Usage (Node.js or Browser)\n\nCreate a QR code with a fixed amount and a transaction note.\n\n```javascript\nimport { UPIQR } from '@adityavijay21/upiqr';\n\nasync function generate() {\n  const { qr, intent } = await new UPIQR()\n    .set({\n      upiId: 'adityavijay21@okicici',\n      name: 'Aditya Vijay',\n      amount: 150.75,\n      transactionNote: 'For the awesome project!',\n    })\n    .generate();\n    \n  // qr is a base64 PNG dataURL string that can be used in an \u003cimg\u003e tag.\n  console.log(qr);\n}\n\ngenerate();\n```\n\n### 2\\. Variable Amount (Static QR)\n\nOmit the `amount` field to let the person paying enter the amount themselves.\n\n```javascript\nimport { UPIQR } from '@adityavijay21/upiqr';\n\nconst { qr } = await new UPIQR()\n  .set({\n    upiId: 'adityavijay21@okicici',\n    name: 'Aditya Vijay',\n    // No amount is specified\n  })\n  .generate();\n```\n\n### 3\\. React Example\n\nA simple React component to display a generated QR code.\n\n```jsx\nimport React, { useState, useEffect } from 'react';\nimport { UPIQR } from '@adityavijay21/upiqr';\n\nfunction PaymentQRCode() {\n  const [qrCode, setQrCode] = useState('');\n  \n  useEffect(() =\u003e {\n    async function getQRCode() {\n      const { qr } = await new UPIQR()\n        .set({\n          upiId: 'shop@ybl',\n          name: 'My Awesome Shop',\n          amount: 250,\n        })\n        .generate();\n      setQrCode(qr);\n    };\n\n    getQRCode();\n  }, []);\n\n  if (!qrCode) return \u003cdiv\u003eLoading...\u003c/div\u003e;\n\n  return \u003cimg src={qrCode} alt=\"UPI QR Code\" /\u003e;\n};\n```\n\n### 4\\. React Native Example (using SVG)\n\nFor React Native, generating an SVG is the best approach. You'll need `react-native-svg`.\n\n```jsx\nimport React, { useState, useEffect } from 'react';\nimport { View, Text } from 'react-native';\nimport { SvgXml } from 'react-native-svg';\nimport { UPIQR } from '@adityavijay21/upiqr';\n\nfunction PaymentQRCodeNative() {\n  const [qrSvg, setQrSvg] = useState(null);\n\n  useEffect(() =\u003e {\n    async function getQRCode() {\n      const { qr } = await new UPIQR()\n        .set({ upiId: 'shop@ybl', name: 'React Native Shop' })\n        .setOptions({ outputType: 'svg' }) // Generate an SVG string\n        .generate();\n      setQrSvg(qr);\n    };\n\n    getQRCode();\n  }, []);\n\n  if (!qrSvg) return \u003cText\u003eLoading QR Code...\u003c/Text\u003e;\n\n  return \u003cSvgXml xml={qrSvg} width=\"250\" height=\"250\" /\u003e;\n};\n```\n\n-----\n\n## 🛠️ API Reference\n\n### `.set(params)`\n\nSets the UPI payment parameters.\n\n| Field | Type | Description | Required |\n| :--- | :--- | :--- | :--- |\n| `upiId` | String | The UPI ID of the payee (e.g., `user@bank`). | **Yes** |\n| `name` | String | The registered name of the payee. | **Yes** |\n| `amount`| Number | Amount to be paid. Omit for variable amount. | No |\n| `payeeMerchantCode` | String | Your Merchant Category Code. | No |\n| `transactionId` | String | A unique transaction ID for your reference. | No |\n| `transactionRef` | String | A reference ID for the transaction (e.g., Invoice \\#).| No |\n| `transactionNote` | String | A note for the payment (e.g., \"Coffee Payment\"). | No |\n| `minimumAmount` | Number | The minimum amount allowed for payment. | No |\n| `currency` | String | Currency code (defaults to `INR`). | No |\n\n### `.setOptions(options)`\n\nCustomizes the visual appearance of the generated QR code.\n\n| Field | Type | Description | Default |\n| :--- | :--- | :--- | :--- |\n| `outputType` | `'dataURL'`, `'svg'`, `'utf8'` | The desired output format of the QR code. | `'dataURL'` |\n| `width` | Number | The width of the QR code image in pixels. | `undefined` |\n| `margin` | Number | The width of the quiet zone border. | `4` |\n| `color.dark`| String (Hex)| The color of the dark modules (e.g., `#000000`). | `#000000FF`|\n| `color.light`| String (Hex)| The color of the light modules (e.g., `#FFFFFF`). | `#FFFFFFFF`|\n| `errorCorrectionLevel`| `'L'`, `'M'`, `'Q'`, `'H'` | The level of error correction. | `'M'` |\n\n### `.generate()`\n\nGenerates the QR code.\n\n  * **Returns:** `Promise\u003cUPIQRResult\u003e`\n  * `UPIQRResult` is an object: `{ qr: string, intent: string }`\n\n-----\n\n## 🤝 Contributing\n\nContributions, issues, and feature requests are welcome\\! Feel free to check the [issues page](https://www.google.com/search?q=https://github.com/adityavijay21/@adityavijay21/upiqr/issues).\n\n## 📄 License\n\nThis project is [MIT](https://www.google.com/url?sa=E\u0026source=gmail\u0026q=https://github.com/adityavijay21/@adityavijay21/upiqr/blob/main/LICENSE) licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityavijay21%2Fupiqr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadityavijay21%2Fupiqr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityavijay21%2Fupiqr/lists"}