{"_id":"@dev_innovations_labs/phonepe-pg-sdk","_rev":"6-2ddb50dbe3dc1cecf071033df01aba90","name":"@dev_innovations_labs/phonepe-pg-sdk","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@dev_innovations_labs/phonepe-pg-sdk","version":"1.0.0","keywords":["phonepe","phonepe-pg","payment-gateway","pg-sdk","checkout-v2","upi","react","react-native","nodejs","javascript","typescript","web-payments"],"author":{"name":"Dev Innovations Labs"},"_id":"@dev_innovations_labs/phonepe-pg-sdk@1.0.0","maintainers":[{"name":"sharan036","email":"sharangopal36@gmail.com"}],"dist":{"shasum":"008b0393c83792898f4be0e5e4c197c4caeac026","tarball":"https://registry.npmjs.org/@dev_innovations_labs/phonepe-pg-sdk/-/phonepe-pg-sdk-1.0.0.tgz","fileCount":25,"integrity":"sha512-8igsL94OIp9tCt0fL+l5XC7aI4V47B0LZq7Vx7p0NDozROfba6LeqaBrzDf7eQ/L1hu8jsakOsjmDuqgnZinpA==","signatures":[{"sig":"MEYCIQDY+oHQ72PxXwMVCl0QjZgu04fOlj44UpoxHB/7bAaQzQIhAPLXcVNCsZqGVZ84Pn5vpXXwckjnU9jKEAfuQKGovx0a","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27445},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"},"./native":{"types":"./dist/native.d.ts","import":"./dist/native.esm.js","require":"./dist/native.js"}},"scripts":{"build":"rollup -c"},"_npmUser":{"name":"sharan036","email":"sharangopal36@gmail.com"},"_npmVersion":"10.9.2","directories":{},"_nodeVersion":"22.16.0","dependencies":{"uuid":"^9.0.0","axios":"^1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.9.0","typescript":"^5.3.3","rollup-plugin-typescript2":"^0.34.1"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*"},"peerDependenciesMeta":{"react-native-webview":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/phonepe-pg-sdk_1.0.0_1769368919596_0.4736201346208957","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@dev_innovations_labs/phonepe-pg-sdk","version":"1.0.1","keywords":["phonepe","phonepe-pg","payment-gateway","pg-sdk","checkout-v2","upi","react","react-native","nodejs","javascript","typescript","web-payments"],"author":{"name":"Dev Innovations Labs"},"_id":"@dev_innovations_labs/phonepe-pg-sdk@1.0.1","maintainers":[{"name":"sharan036","email":"sharangopal36@gmail.com"}],"dist":{"shasum":"cf8637eee1eaba1c05ce69724c827e73813102dd","tarball":"https://registry.npmjs.org/@dev_innovations_labs/phonepe-pg-sdk/-/phonepe-pg-sdk-1.0.1.tgz","fileCount":25,"integrity":"sha512-c/TrZbWSuF2Kxve0q3wRqKjNAJaOUM4GzaIlQmF6JoPavJrWdIryId409C/ZbVszYiGUWoDw3abgR9p7pcvhUw==","signatures":[{"sig":"MEUCIQCRdDC3GeUUeHA8vi6yvlQMs+Bmp4gKDbOJtoLKpTGP3wIgWrFd9lKi1+jHmYq5EtVVRMzVjrWLDv6ag3r+tz1C4KY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33261},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"},"./native":{"types":"./dist/native.d.ts","import":"./dist/native.esm.js","require":"./dist/native.js"}},"scripts":{"build":"rollup -c"},"_npmUser":{"name":"sharan036","email":"sharangopal36@gmail.com"},"_npmVersion":"10.9.2","description":"::: {align=\"center\"} ```{=html} <h1> ``` 📱 PhonePe PG SDK ```{=html} </h1> ``` ```{=html} <h3> ``` @dev_innovations_labs/phonepe-pg-sdk ```{=html} </h3> ``` ```{=html} <p> ``` A unified PhonePe Payment Gateway SDK for `<b>`{=html}Node.js`</b>`{=html}, `<","directories":{},"_nodeVersion":"22.16.0","dependencies":{"uuid":"^9.0.0","axios":"^1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.9.0","typescript":"^5.3.3","rollup-plugin-typescript2":"^0.34.1"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*"},"peerDependenciesMeta":{"react-native-webview":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/phonepe-pg-sdk_1.0.1_1769369193534_0.4153736872189828","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@dev_innovations_labs/phonepe-pg-sdk","version":"1.0.2","_id":"@dev_innovations_labs/phonepe-pg-sdk@1.0.2","maintainers":[{"name":"sharan036","email":"sharangopal36@gmail.com"}],"dist":{"shasum":"1539de751c5da3f351f925dba9ac2e15e23b1a3d","tarball":"https://registry.npmjs.org/@dev_innovations_labs/phonepe-pg-sdk/-/phonepe-pg-sdk-1.0.2.tgz","fileCount":23,"integrity":"sha512-dot8Gp2AbOGEdR6Eva9FaIQQ5SYwqjueOjrb3fyzhvLuSlykzwANB9g3ENOkJN4YcbICkMcgfYX53/q4QgeRuQ==","signatures":[{"sig":"MEUCIQDuBzzr45FPG/BeouR9vEpJglZ4DUM3GOgdwo+bxp8TgQIgPpbYk5kCzqbjAr/44xCmPCPBSlgJMLK7OzZOyvxUSgA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40732},"main":"dist/index.esm.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","exports":{".":"./dist/index.esm.js","./native":"./dist/native.esm.js"},"scripts":{"build":"rollup -c"},"_npmUser":{"name":"sharan036","email":"sharangopal36@gmail.com"},"_npmVersion":"10.9.2","description":"📱 PhonePe PG SDK @dev_innovations_labs/phonepe-pg-sdk <p align=\"center\"> A unified PhonePe Payment Gateway SDK for <b>Node.js</b>, <b>React Web</b>, and <b>React Native</b> using the latest Checkout v2 APIs. </p> <p align=\"center\"> <img src=\"https://img.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"uuid":"^9.0.0","axios":"^1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.9.0","typescript":"^5.3.3","@rollup/plugin-commonjs":"^25.0.7","rollup-plugin-typescript2":"^0.34.1","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*"},"_npmOperationalInternal":{"tmp":"tmp/phonepe-pg-sdk_1.0.2_1769407618028_0.7104860449274304","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@dev_innovations_labs/phonepe-pg-sdk","version":"1.0.3","_id":"@dev_innovations_labs/phonepe-pg-sdk@1.0.3","maintainers":[{"name":"sharan036","email":"sharangopal36@gmail.com"}],"dist":{"shasum":"196c70a5c26454e6fb7b90fbaf1d93e887a0cd86","tarball":"https://registry.npmjs.org/@dev_innovations_labs/phonepe-pg-sdk/-/phonepe-pg-sdk-1.0.3.tgz","fileCount":23,"integrity":"sha512-n5Wl4Fe7/KOF/ry4Q61nIJ4MAVJn1J83dB4eseIGuOcNbOFgJVoGinDn/FNH1eZNJz6txc4iD7NygNfRj/eKfw==","signatures":[{"sig":"MEQCIBt9KqM49lhgsI2cYqr1l3HRuilR8O13Tuil2kckwLKdAiAT7OnmvfXYhiJant4bgzRko/oaa4g3QiAxvhWySiH/ag==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33162},"main":"dist/index.esm.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","exports":{".":"./dist/index.esm.js","./native":"./dist/native.esm.js"},"scripts":{"build":"rollup -c"},"_npmUser":{"name":"sharan036","email":"sharangopal36@gmail.com"},"_npmVersion":"10.9.2","description":"📱 PhonePe PG SDK @dev_innovations_labs/phonepe-pg-sdk <p align=\"center\"> A unified PhonePe Payment Gateway SDK for <b>Node.js</b>, <b>React Web</b>, and <b>React Native</b> using the latest Checkout v2 APIs. </p> <p align=\"center\"> <img src=\"https://img.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"uuid":"^9.0.0","axios":"^1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.9.0","typescript":"^5.3.3","@rollup/plugin-commonjs":"^25.0.7","rollup-plugin-typescript2":"^0.34.1","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*"},"_npmOperationalInternal":{"tmp":"tmp/phonepe-pg-sdk_1.0.3_1769414268440_0.7719578411969157","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@dev_innovations_labs/phonepe-pg-sdk","version":"1.0.4","keywords":["phonepe","phonepe-pg","payment-gateway","pg-sdk","checkout-v2","upi","react","react-native","nodejs","javascript","typescript","web-payments"],"_id":"@dev_innovations_labs/phonepe-pg-sdk@1.0.4","maintainers":[{"name":"sharan036","email":"sharangopal36@gmail.com"}],"dist":{"shasum":"fb6a46815152ffb1e468809f88579b06eb0a7d94","tarball":"https://registry.npmjs.org/@dev_innovations_labs/phonepe-pg-sdk/-/phonepe-pg-sdk-1.0.4.tgz","fileCount":23,"integrity":"sha512-WhHnNieIbEjeq9/R9sOt9Ye9pwSpMqrkAn0fDMBbXvtZO1O1duLZuz0j1IBRqtnvGfw4MfmyNHgvuJ5oihUD6w==","signatures":[{"sig":"MEYCIQCly8UwArRXeIAS56cUJuezusKa0qCwZdJdAcuRm5yvRAIhALHiXQNrWhTF4+HhxzENQv25N+rygQLcLxzVN8UUlnHh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32813},"main":"dist/index.esm.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","exports":{".":"./dist/index.esm.js","./native":"./dist/native.esm.js"},"scripts":{"build":"rollup -c"},"_npmUser":{"name":"sharan036","email":"sharangopal36@gmail.com"},"_npmVersion":"10.9.2","description":"📱 PhonePe PG SDK @dev_innovations_labs/phonepe-pg-sdk <p align=\"center\"> A unified PhonePe Payment Gateway SDK for <b>Node.js</b>, <b>React Web</b>, and <b>React Native</b> using the latest Checkout v2 APIs. </p> <p align=\"center\"> <img src=\"https://img.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"uuid":"^9.0.0","axios":"^1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.9.0","typescript":"^5.3.3","@rollup/plugin-commonjs":"^25.0.7","rollup-plugin-typescript2":"^0.34.1","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*"},"_npmOperationalInternal":{"tmp":"tmp/phonepe-pg-sdk_1.0.4_1769414663231_0.6929950192818575","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@dev_innovations_labs/phonepe-pg-sdk","version":"1.0.5","type":"module","main":"dist/index.esm.js","types":"dist/index.d.ts","module":"dist/index.esm.js","keywords":["phonepe","phonepe-pg","payment-gateway","pg-sdk","checkout-v2","upi","react","react-native","nodejs","javascript","typescript","web-payments"],"exports":{".":"./dist/index.esm.js","./native":"./dist/native.esm.js"},"dependencies":{"axios":"^1.6.0","uuid":"^9.0.0"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*"},"devDependencies":{"typescript":"^5.3.3","rollup":"^4.9.0","rollup-plugin-typescript2":"^0.34.1","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-commonjs":"^25.0.7"},"scripts":{"build":"rollup -c"},"publishConfig":{"access":"public"},"_id":"@dev_innovations_labs/phonepe-pg-sdk@1.0.5","description":"📱 PhonePe PG SDK @dev_innovations_labs/phonepe-pg-sdk <p align=\"center\"> A unified PhonePe Payment Gateway SDK for <b>Node.js</b>, <b>React Web</b>, and <b>React Native</b> using the latest Checkout v2 APIs. </p> <p align=\"center\"> <img src=\"https://img.","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-raYQXEpQiAqGsgdn84qD8eVuoQo4DJQsmzznKKN3cFGw05Qpik8QABkEqwdrSUPtX0Eu1pFV0kHWWoptpecdqQ==","shasum":"93f798a609f62033316f4582e8835aa2580e2646","tarball":"https://registry.npmjs.org/@dev_innovations_labs/phonepe-pg-sdk/-/phonepe-pg-sdk-1.0.5.tgz","fileCount":23,"unpackedSize":32802,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFx0K8Escz4vBvT9w/De1ah4HOEhQrssBJMcLK/aXyqSAiEAuG52ocmrKmt/cvHwAjedFUuZIxz4sRY4x3It1KzAsfQ="}]},"_npmUser":{"name":"sharan036","email":"sharangopal36@gmail.com"},"directories":{},"maintainers":[{"name":"sharan036","email":"sharangopal36@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/phonepe-pg-sdk_1.0.5_1769416128829_0.46291424346462895"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-25T19:21:59.534Z","modified":"2026-01-26T08:28:49.405Z","1.0.0":"2026-01-25T19:21:59.729Z","1.0.1":"2026-01-25T19:26:33.687Z","1.0.2":"2026-01-26T06:06:58.179Z","1.0.3":"2026-01-26T07:57:48.594Z","1.0.4":"2026-01-26T08:04:23.365Z","1.0.5":"2026-01-26T08:28:48.977Z"},"keywords":["phonepe","phonepe-pg","payment-gateway","pg-sdk","checkout-v2","upi","react","react-native","nodejs","javascript","typescript","web-payments"],"description":"📱 PhonePe PG SDK @dev_innovations_labs/phonepe-pg-sdk <p align=\"center\"> A unified PhonePe Payment Gateway SDK for <b>Node.js</b>, <b>React Web</b>, and <b>React Native</b> using the latest Checkout v2 APIs. </p> <p align=\"center\"> <img src=\"https://img.","maintainers":[{"name":"sharan036","email":"sharangopal36@gmail.com"}],"readme":"📱 PhonePe PG SDK\n@dev_innovations_labs/phonepe-pg-sdk\n<p align=\"center\"> A unified PhonePe Payment Gateway SDK for <b>Node.js</b>, <b>React Web</b>, and <b>React Native</b> using the latest Checkout v2 APIs. </p> <p align=\"center\"> <img src=\"https://img.shields.io/npm/v/@dev_innovations_labs/phonepe-pg-sdk?color=blue&style=for-the-badge\" /> <img src=\"https://img.shields.io/npm/dm/@dev_innovations_labs/phonepe-pg-sdk?style=for-the-badge\" /> <img src=\"https://img.shields.io/badge/PhonePe-PG%20SDK-purple?style=for-the-badge\" /> </p>\n\n------------------------------------------------------------------------\n\n# 🖼️ Screenshots\n\n### 🌐 Web Checkout\n\n![Web\nCheckout](https://dummyimage.com/800x400/000/fff&text=Web+Checkout+Preview)\n\n### 📱 React Native Checkout\n\n![React Native\nCheckout](https://dummyimage.com/800x400/333/fff&text=React+Native+WebView+Checkout)\n\n------------------------------------------------------------------------\n\n# 🚀 Features\n\n-   🔐 OAuth Token Generation (Checkout v2)\n-   💳 Initiate Payments (Web, Mobile, UPI, Cards)\n-   🔄 WebView Support for React Native\n-   🧪 Status Check API\n-   🌍 Sandbox & Production Environments\n-   🎯 TypeScript Fully Supported\n-   🧩 Multi-platform Unified SDK\n-   🧵 Auto-environment normalization\n\n------------------------------------------------------------------------\n\n# 📦 Installation\n\n``` bash\nnpm install @dev_innovations_labs/phonepe-pg-sdk\n```\n\n------------------------------------------------------------------------\n\n# ⚙️ Environments\n\n  Input                Interpreted As\n  ------------------  ----------------\n  production, prod      Production\n  sandbox, SANDBOX      Sandbox\n\n------------------------------------------------------------------------\n\n# 📚 Usage\n\n------------------------------------------------------------------------\n\n## 🟦 1. Node.js Example\n\n``` ts\nimport { PhonePeNode } from \"@dev_innovations_labs/phonepe-pg-sdk\";\n\nconst phonepe = new PhonePeNode({\n  clientId: \"YOUR_CLIENT_ID\",\n  clientSecret: \"YOUR_SECRET\",\n  environment: \"production\"\n});\n\nconst res = await phonepe.createPayment({\n  merchantId: \"M123\",\n  merchantOrderId: \"uuid-123\",\n  amount: 10000,\n  redirectUrl: \"https://yourapp.com/redirect\",\n  callbackUrl: \"https://yourapp.com/callback\"\n});\n\nconsole.log(res.redirectUrl);\n```\n\n------------------------------------------------------------------------\n\n## 🌐 2. React Web Example\n\n``` jsx\nimport { PhonePeCheckoutWeb } from \"@dev_innovations_labs/phonepe-pg-sdk\";\n\nexport default function Checkout({ redirectUrl }) {\n  return (\n    <PhonePeCheckoutWeb\n      redirectUrl={redirectUrl}\n      onSuccess={(d) => console.log(\"Success\", d)}\n      onError={(e) => console.log(\"Error\", e)}\n    />\n  );\n}\n```\n\n------------------------------------------------------------------------\n\n## 📱 3. React Native Example\n\n``` jsx\nimport { PhonePeCheckoutNative } from \"@dev_innovations_labs/phonepe-pg-sdk/native\";\n\nexport default function App({ redirectUrl }) {\n  return (\n    <PhonePeCheckoutNative\n      redirectUrl={redirectUrl}\n      onSuccess={(data) => console.log(\"Success\", data)}\n      onError={(e) => console.log(\"Error\", e)}\n    />\n  );\n}\n```\n\n------------------------------------------------------------------------\n\n# 📡 Status API\n\n``` ts\nconst status = await phonepe.checkStatus(\"uuid-1234\");\nconsole.log(status);\n```\n\n------------------------------------------------------------------------\n\n# 📘 API Table\n\n  API                        Platform       Description\n  -------------------------- -------------- -------------------------------\n  `createPayment()`          Node/Web/RN    Initiates PhonePe Checkout v2\n  `checkStatus()`            Node           Checks transaction status\n  `PhonePeCheckoutWeb`       React Web      In-App iFrame Checkout\n  `PhonePeCheckoutNative`    React Native   Mobile WebView Checkout\n  `normalizeEnvironment()`   Internal       Normalizes env strings\n\n------------------------------------------------------------------------\n\n# 🧩 Folder Structure\n\n    src/\n      index.ts\n      native.ts\n      PhonePeNode.ts\n      PhonePeReact.tsx\n      PhonePeReactNative.tsx\n      utils.ts\n      types.ts\n    dist/\n\n------------------------------------------------------------------------\n\n# 🏗 Roadmap\n\n-   [ ] Add PhonePe payouts API\n-   [ ] Add checksum support for PG v1\n-   [ ] Add UI components for receipts\n-   [ ] Add webhooks helpers\n\n------------------------------------------------------------------------\n\n# 👨‍💻 Contributors\n\n  Name                    Role\n  ----------------------- ----------------\n  Dev Innovations Labs    Lead Developer\n  Open Source Community   Coming Soon\n\n------------------------------------------------------------------------\n\n# 📝 Changelog\n### v1.0.4\n\n✔ Safe Web + RN redirectUrl-only flow\n✔ Fixed CORS issues\n✔ Removed frontend secrets\n✔ Added stable TypeScript typings\n✔ Updated build + exports\n✔ React 19–ready\n\n------------------------------------------------------------------------\n\n# 📄 License\n\nMIT © Dev Innovations Labs\n","readmeFilename":"README.md"}