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

@mss.ba/pikpay-node

v0.0.3

Published

NodeJS wrapper for PikPay payment gateway

Readme

PikPay NodeJS Wrapper

img

Wrapper for PikPay payment gateway

Prerequisites

You have to have access to test PikPay gateway .

Getting Started


const pikpay = require("@mss.ba/pikpay-node");

const _AUTHENTICITY_TOKEN = process.env.AUTHENTICITY_TOKEN || "YOUR TOKEN FROM PIKPAY";
const _API_AUTH_KEY = process.env.API_AUTH_KEY || "YOUR API TOKEN FROM PIKPAY"";
const _API_ACTION_URL = process.env.API_ACTION_URL || "API URL FROM PIKPAY";



const transaction = {
    "ch-full-name" : "John Doe",
    "ch-address": "Elm Street 22",
    "ch-city" : "Mostar",
    "ch-zip": 22000,
    "ch-country": "Bosnia and Herzegovina",
    "ch-phone": "38761854123",
    "ch-email": "[email protected]",
    "pan": 4341000000000000,
    "cvv": 000,
    "expiration_date": "000",
    "order-info": "tandara-2222",
    "order-number": "test001",
    "amount": 54301,
    "currency": "BAM",
    "ip": "127.0.0.1",
    "language": "hr",
    "transaction-type": "purchase",
    "authenticity-token" : _AUTHENTICITY_TOKEN,
    "digest": pikpay.generateDigest({
        "api-auth-key": _API_AUTH_KEY,
        "order-number": "test001",
        "amount": 54301,
        "currency": "BAM"
    })
   }


void (async function(){ 

    const response = await pikpay.asyncCreateTransaction(transaction,_API_ACTION_URL);
    console.log(response);
})();

There are two response codes

  • code 1
  • code 2

If you get Code2, that means that you need to activate 3D security for Visa credit cards

Create listener on your side fetch PaRes and MD and activate function

const finish3Dsecurity = await pikpay.asyncFinish3DTransaction(_API_PARES_URL, PaRes, MD);

	const statusInt = finish3Dsecurity.status ? 1 : 0;
    const { errors, data } = finish3Dsecurity;

    if (errors.length > 0) {
       console.log(errors.join());
    }

Available functions

  • generateDigest (Creating Digest which is required by PikPay)
  • makeid(Simple number order generator),
  • asyncCreateTransaction,
  • asyncFinish3DTransaction
const digest = generateDigest({

   "api-auth-key": _API_AUTH_KEY,
    "order-number": "test001",
    "amount": 54301,
    "currency": "BAM"

});

console.log(digest);

Prerequisites

Just install it

Installing

Run command

npm i @mss.ba/pikpay-node

Running the tests

There are not test's at the moment

Future vision for project

Standardized code style Tests Make better outputs Remove doubled xml generators

Built With packages

  • Crypto
  • Axios
  • xml-js
  • js2xmlparser

Contributing

We love contributors, send us PR and we will make it come merged to our lovely wrapper

Versioning

TBD but we are thinking to use use SemVer for versioning.

Authors

See also the list of TBM

License

This project is licensed under the MIT License - see the LICENSE.md file for details