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

yaadpay.js

v0.0.7

Published

API wrapper for YaadPay by Hyp

Readme

YaadPay.js

CI npm version

An unofficial JavaScript SDK for YaadPay!

  • 🚀 Make API calls against YaadPay's official REST API
  • ⚠️ Extracts error messages from the occasional Yaad HTML error page
  • 😅 Adds helpful error messages to all those pesky CCodes (From the offical docs)

Official YaadPay API docs are here.

❗ This package is not ready. Please do not use it yet.

Installation

npm install yaadpay.js

Usage

const { createYaadPay } = require('yaadpay.js');

// Create an instance.
// (These are the offical YaadPay test API keys)
const yaad = createYaadPay({
	apiKey: "7110eda4d09e062aa5e4a390b0a572ac0d2c0220",
	masofId: "0010131918",
	passp: "yaad"
});	

Create a YaadPay payment link

// All params are optional for signing, but then the request won't do much without them :)
let params = {
	Amount: 10, // Payment amount
	Coin: 1, // Currency code (1 = ILS, 2 = USD, 3 = EUR, 4 = GBP)
	
	// Configure the page
	Info: "A test payment. Thanks for the business!", // Description string shown to the user
	PageLang: "HEB", // Page language: ENG or HEB
	heshDesc: "[0~Item 1~1~8][0~Item 2~2~1]", // Line items
	Pritim: true, // Show line items
	tmp: 1 // HTML Template to use for the form. YaadPay provides 16 templates out of the box. You can add a custom one at additioanl cost by contacting Yaad support. See https://yaadpay.docs.apiary.io/introduction/selecting-template/our-templates
	
	
	// Order info
	Order: "12345678910", // Order number from your system. This is an opaque string that's stored for your convenience
	UserId: "203269535", // User ID from your system. This is an opaque string that's stored for your convenience
	
	
	// Prefill  user info for the form
	ClientName: "Israel",
	ClientLName: "Isareli",
	street: "levanon 3",
	city: "netanya",
	zip: "42361",
	phone: "098610338",
	cell: "050555555555",
	email: "[email protected]",
	
	// Monthly payments
	Tash: 2, // Maximum allowed monthly payments
	FixTash: false, // Prevent the user from editing the amount of monthly payments
	ShowEngTashText: true, // Show monthly breakdown 
	
	// Other
	Postpone: false,
	J5: false, 
	Sign: true, // Append a cryptographic signature to the URL so it can be verified by Yaad's servers. Required by default, can be disabled on their dashboard
	MoreData: true,
	sendemail: true,
	SendHesh: true, // Send the customer an email receipt
	UTF8: true, // Inform the server that your Strings are encoded in UTF-8
	UTF8out: true, // Request that server responses be encoded in UTF-8
}

// Returns a payment URL for the user
const signedPaymentUrl = await yaad.signUrl(params);

Verify a transaction

const inputUrl = "****" // Success redirect URL from YaadPay after checkout success;

// Returns true on success, throws with error on failure
await yaad.verifyTransactionSuccess({ yaadSuccessURL: inputUrl });

Examples of improved DX

When verifying a payment, instead of getting:

https://icom.yaad.net/yaadpay/tmp/apitest/yaadsuccesspagedemo.htm?Id=12788261&CCode=0&Amount=10&ACode=0012345&Order=12345678910&Fild1=Israel%20Isareli&Fild2=test%40yaad.net&Fild3=&Sign=13cccf141e2fc2e2dd8d8201a90d58929514d97e00084cb9436cab087f1ba8c6&Bank=6&Payments=1&UserId=203269535&Brand=2&Issuer=2&L4digit=0000&street=levanon%203&city=netanya&zip=42361&cell=098610338&Coin=1&Tmonth=03&Tyear=2023&errMsg=%20(0)&Hesh=31

You get:

	{
 	"transactionId": "123",
 	"addressCity": "netanya",
 	"addressStreet": "levanon 3",
 	"addressZip": "42361",
 	"cardExpiryMonth": "03",
 	"cardExpiryYear": "2023",
 	"cardNetwork": "Visa",
 	"cardProcessor": "Leumi Card",
 	"cellPhoneNumber": "098610338",
 	"creditCardConfirmationCode": "0012345",
 	"creditCardIssuer": "Visa Cal",
 	"currencyCode": "ILS",
 	"email": "[email protected]",
 	"errorMessage": " (0)",
 	"fullName": "Israel Isareli",
 	"invoiceNumber": "31",
 	"lastFourDigits": "0000",
 	"orderId": "12345678910",
 	"paymentCount": "1",
 	"phone": "",
 	"signature": "13cccf141e2fc2e2dd8d8201a90d58929514d97e00084cb9436cab087f1ba8c6",
 	"transactionAmount": "10",
 	"transactionId": "12788261",
 	"userId": "203269535",
 	"yaadCCode": "0",
 	"humanReadable": {
	 	"amount": "10 ILS",
	 	"amountWithPaymentCount": "10 ILS in 1 payment",
	 	"paymentMethod": "Visa Cal card ending in 0000",
 	},
 	"success": true,
}

Ahh...

To-do

  • [x] Verify payments
  • [ ] 429 retry with binexp backoff

Legal

YaadPay is a registered trademark of Yaad Payments Ltd. All rights reserved.

Learn more about YaadPay here.

Thank You

Development sponsored by razorUX