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

payu-hosted-hash-tool

v3.1.0

Published

PayU SHA-512 hashes across 14 modes: hosted checkout, _payment v19, SI/TPV/split requests, generic API commands, reverse verification, subscription webhooks and closed-loop wallet callbacks. CLI, Node API, and web UI.

Readme

PayU Hosted Checkout – Hash Generator

Generate PayU SHA-512 hashes for hosted checkout and related flows. Same chains as the bundled web UI (index.html). Available as:

  • CLIpayu-hash / npx payu-hosted-hash-tool
  • Node.js APIrequire('payu-hosted-hash-tool')
  • Web tool – open index.html or run npm run web

Hash modes (CLI: --mode=… or env PAYU_MODE; API: generateHashForMode(mode, params)):

| Mode | Use | |------|-----| | forward-udf | Hosted payment request (default): key|txnid|…|udf5||||||salt | | forward-v19 | _payment API api_version=19 extended chain (udf1–10, user token, offer fields, cart, extra charges, phone) | | forward-si-details | Subscriptions / SI registration (cards SI, NB SI, UPI autopay) with si_details JSON | | forward-beneficiary-tpv | TPV – NEFT / net banking / UPI with beneficiarydetail JSON | | forward-split-request | Split settlement request with splitRequest JSON appended after salt | | forward-api-command | Generic API command: key|command|var1|salt (verify_payment, cancel_refund_transaction, etc.) | | reverse-normal | Response verification (regular reverse) | | reverse-add-charges | Reverse with additional_charges prefix | | reverse-split | Reverse with splitInfo | | reverse-split-add | Reverse with additional_charges and splitInfo | | reverse-si-details | TPV autopay / subscription response with si_details | | reverse-beneficiary | TPV response with beneficiarydetail | | webhook-subscription | Subscriptions webhook signature (status, authpayuId, notificationType, billingAmount, …) | | callback-pg-load-clw | Closed-loop wallet PG load callback (merchantCode, clientTxnId, loadAmount, …) |

Forward reference: PayU – Generate Hash (PayU Hosted). Subscriptions, TPV, split settlement and webhook formulas follow the chains documented in Authentication with PayU APIs and the respective product pages.


Install

npm install payu-hosted-hash-tool

Or run without installing:

npx payu-hosted-hash-tool

CLI usage

Default mode is forward-udf (same as v1.0).

payu-hash --key=gtKFFx --txnid=123321 --amount=100.00 --productinfo=Groceries \
  --firstname="Palguna" [email protected] --salt=YOUR_SALT

# Other modes
payu-hash --mode=forward-v19 --key=… --txnid=… --amount=… --productinfo=… \
  --firstname=… --email=… --salt=… \
  --udf6= --udf7= --udf8= --udf9= --udf10= \
  --user_token= --offer_key= --offer_auto_apply= --cart_details= --extra_charges= --phone=

payu-hash --mode=reverse-normal --salt=S --status=success \
  --udf1= --udf2= --udf3= --udf4= --udf5= \
  [email protected] --firstname=F --productinfo=P --amount=10 --txnid=1 --key=K

# Show the pipe-separated string (stderr)
payu-hash --key=… --salt=… --show-string

Options

| Option | Description | |--------|-------------| | --mode | One of the 14 modes listed above | | --key--salt | Forward / v19 fields (see web tool for full list) | | --status, --additional-charges, --split-info, --split-request | Reverse and split modes | | --si-details, --beneficiarydetail | JSON parameters for SI / TPV modes | | --command, --var1 | Generic API command (forward-api-command) | | --authpayuid, --notification-type, --billing-amount, --payment-start-date, --payment-end-date, --message, --event-date | Subscription webhook fields | | --merchant-code, --client-txn-id, --load-amount, --accosa-ref-no, --accosa-transaction-id, --response-code, --response-message, --merchant-salt | Closed-loop wallet callback fields | | --show-string | Print concatenated string to stderr | | -h, --help | Help |

Environment: standard PAYU_* envs for all parameters above (e.g. PAYU_SI_DETAILS, PAYU_BENEFICIARYDETAIL, PAYU_SPLIT_REQUEST, PAYU_COMMAND, PAYU_VAR1, PAYU_AUTHPAYUID, PAYU_MERCHANTCODE, …). Arguments override env.


Node.js API

const {
  HASH_MODES,
  generateHash,
  buildHashString,
  generateHashForMode,
  buildHashStringForMode,
} = require('payu-hosted-hash-tool');

// Default / legacy: hosted forward (forward-udf)
const { hash, hashString } = generateHash(
  {
    key: 'gtKFFx',
    txnid: '123321',
    amount: '100.00',
    productinfo: 'Groceries',
    firstname: 'Palguna',
    email: '[email protected]',
    udf1: '',
  },
  'YOUR_SALT'
);

// Any mode: flat params object (keys match CLI / README)
const rev = generateHashForMode('reverse-normal', {
  salt: 'S',
  status: 'success',
  udf1: '',
  udf2: '',
  udf3: '',
  udf4: '',
  udf5: '',
  email: '[email protected]',
  firstname: 'F',
  productinfo: 'P',
  amount: '10',
  txnid: '1',
  key: 'K',
});
  • HASH_MODES – array of allowed mode strings
  • generateHash(params, salt) / buildHashString(params, salt)forward-udf only (backward compatible)
  • generateHashForMode(mode, params) / buildHashStringForMode(mode, params) – all modes; params must include salt where the formula uses it

Web tool

  • Open index.html, or from the package directory: npm run web → http://localhost:8080
  • Deploy the folder (e.g. Netlify) for a shared URL. Publishing to npm does not update a Netlify site—redeploy the static site separately.

Security

  • Production: Generate hashes on your server. Never expose salt to the client or in the payment POST body.
  • CLI and web UI are for integration and debugging.

License

MIT