npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2026 – Pkg Stats / Ryan Hefner

@dev_innovations_labs/phonepe-pg-sdk

v1.0.5

Published

πŸ“± 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.

Readme

πŸ“± PhonePe PG SDK @dev_innovations_labs/phonepe-pg-sdk


πŸ–ΌοΈ Screenshots

🌐 Web Checkout

Web
Checkout

πŸ“± React Native Checkout

React Native
Checkout


πŸš€ Features

  • πŸ” OAuth Token Generation (Checkout v2)
  • πŸ’³ Initiate Payments (Web, Mobile, UPI, Cards)
  • πŸ”„ WebView Support for React Native
  • πŸ§ͺ Status Check API
  • 🌍 Sandbox & Production Environments
  • 🎯 TypeScript Fully Supported
  • 🧩 Multi-platform Unified SDK
  • 🧡 Auto-environment normalization

πŸ“¦ Installation

npm install @dev_innovations_labs/phonepe-pg-sdk

βš™οΈ Environments

Input Interpreted As


production, prod Production sandbox, SANDBOX Sandbox


πŸ“š Usage


🟦 1. Node.js Example

import { PhonePeNode } from "@dev_innovations_labs/phonepe-pg-sdk";

const phonepe = new PhonePeNode({
  clientId: "YOUR_CLIENT_ID",
  clientSecret: "YOUR_SECRET",
  environment: "production"
});

const res = await phonepe.createPayment({
  merchantId: "M123",
  merchantOrderId: "uuid-123",
  amount: 10000,
  redirectUrl: "https://yourapp.com/redirect",
  callbackUrl: "https://yourapp.com/callback"
});

console.log(res.redirectUrl);

🌐 2. React Web Example

import { PhonePeCheckoutWeb } from "@dev_innovations_labs/phonepe-pg-sdk";

export default function Checkout({ redirectUrl }) {
  return (
    <PhonePeCheckoutWeb
      redirectUrl={redirectUrl}
      onSuccess={(d) => console.log("Success", d)}
      onError={(e) => console.log("Error", e)}
    />
  );
}

πŸ“± 3. React Native Example

import { PhonePeCheckoutNative } from "@dev_innovations_labs/phonepe-pg-sdk/native";

export default function App({ redirectUrl }) {
  return (
    <PhonePeCheckoutNative
      redirectUrl={redirectUrl}
      onSuccess={(data) => console.log("Success", data)}
      onError={(e) => console.log("Error", e)}
    />
  );
}

πŸ“‘ Status API

const status = await phonepe.checkStatus("uuid-1234");
console.log(status);

πŸ“˜ API Table

API Platform Description


createPayment() Node/Web/RN Initiates PhonePe Checkout v2 checkStatus() Node Checks transaction status PhonePeCheckoutWeb React Web In-App iFrame Checkout PhonePeCheckoutNative React Native Mobile WebView Checkout normalizeEnvironment() Internal Normalizes env strings


🧩 Folder Structure

src/
  index.ts
  native.ts
  PhonePeNode.ts
  PhonePeReact.tsx
  PhonePeReactNative.tsx
  utils.ts
  types.ts
dist/

πŸ— Roadmap

  • [ ] Add PhonePe payouts API
  • [ ] Add checksum support for PG v1
  • [ ] Add UI components for receipts
  • [ ] Add webhooks helpers

πŸ‘¨β€πŸ’» Contributors

Name Role


Dev Innovations Labs Lead Developer Open Source Community Coming Soon


πŸ“ Changelog

v1.0.4

βœ” Safe Web + RN redirectUrl-only flow βœ” Fixed CORS issues βœ” Removed frontend secrets βœ” Added stable TypeScript typings βœ” Updated build + exports βœ” React 19–ready


πŸ“„ License

MIT Β© Dev Innovations Labs