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

novinopay-node

v1.0.3

Published

Node.js interface for Novinopay

Downloads

19

Readme

Novinopay-node

npm version

Overview

Novinopay-node is a Node.js interface for the Novinopay internet payment gateway APIs. Currently the payment and verificaiton requests are implemented. For full documentation on the base APIs please visit Novinopay API docs.

Installation

Novinopay-node is available on npm and can be installed using npm's package manager:

npm install novinopay-node

Usage

Once installed, Your Library Name can be imported and used in your project like any other Node.js module:

const novinopay_node = require('novinopay-node');

Or

const { NovinopayNode, PaymentObject, VerificationObject } = require('novinopay-node');

Basic Usage

Step 1

In order to request a payment, you will first need to initialize the NovinopayNode class as follows:

const novinopay = NovinopayNode.init('your merchant id here', 'your default callback url here');

It is important to note that this method might throw an error if given arguments are in anyway invalid. Please refer to Novinopay docs on the constraints for the arguments.

*Initialization with custom method is demostrated in API section.

Step 2

You need to create a PaymentObject as follows:

const paymentObject = PaymentObject.basic('amount in Rls');

It is important to note that this method might throw an error if given arguments are in anyway invalid. Please refer to Novinopay docs on the constraints for the arguments.

*More elaborate styles of PaymentObject can be found in API section.

Step 3

Now you can make the payment request using the following function:

const paymentResponse = await novinopay.paymentRequest(paymentObject);

If any error occurs during the call, an error witll be thrown. Otherwise the response will be the object retured by the Novinopay APIs (see samples here)

Step 4

After the request is made and the user has returned from the payment process, you'll need to verify the payment. in order to do so, you'll need to create a VerificationObject:

const verificationObject = VerificationObject.init('amount in RLs', 'payment authority aquired from "paymentResponse"');

It is important to note that this method might throw an error if given arguments are in anyway invalid. Please refer to Novinopay docs on the constraints for the arguments.

Using this object you can now make the verification request:

const verificationResponse = await novinpay.paymentVerification(verificationObject);

If any error occurs during the call, an error witll be thrown. Otherwise the response will be the object retured by the Novinopay APIs (see samples here)

API

The API of Your Library Name is thoroughly documented in this section, providing users with a comprehensive overview of the library's functionality, including available methods, arguments, and return types.

NovinopayNode.init(merchant_id, callback_url): NovinopayNode

Used to initialize the main class of the library.

Arguments

| Argument | Type | Description | |:--------------:|:------------------:|:-----------------------------------------:| | merchant_id | string | The merchant code provided by Novinopay. | | callback_url | string(url)(1000) | The callback url from the payment system. |

Returns

Instance of Novinopay or throws Error

NovinopayNode.initCustomMethod(merchant_id, callback_url, callback_method): NovinopayNode

Used to initialize the main class of the library.

Arguments

| Argument | Type | Description | |:-----------------:|:------------------------:|:--------------------------------------------:| | merchant_id | string | The merchant code provided by Novinopay. | | callback_url | string(url)(1000) | The callback url from the payment system. | | callback_method | string('GET' or 'POST') | The method used for request to callback url. |

Returns

Instance of Novinopay or throws Error

PaymentObject.basic(amount): PaymentObject

Creates a PaymentObject data class instance.

Arguments

| Argument | Type | Description | |:--------:|:------------------:|:------------------------------:| | amount | string / number | The peyment amount in Rls. |

Returns

Instance of PaymentObject or throws Error

PaymentObject.default(amount, invoice_id, description, email, mobile): PaymentObject

Creates a PaymentObject data class instance.

Arguments

| Argument | Type | Description | |:---------------------:|:--------------------------:|:---------------------------------------------:| | amount | string / number | The peyment amount in Rls. | | invoice_id | string(255) / number | Internal invoice id from your system. | | description | string(255) | Your description for the payment. | | email | string(255) | Email of the user making the payment. | | mobile | string(15) | Phone of the user making the payment. |

Returns

Instance of PaymentObject or throws Error

PaymentObject.full(amount, callback_url, callback_method, invoice_id, description, email, mobile, card_pan): PaymentObject

Creates a PaymentObject data class instance.

Arguments

| Argument | Type | Description | |:---------------------:|:--------------------------:|:---------------------------------------------:| | amount | string / number | The peyment amount in Rls. | | callback_url | string(url)(1000) | The callback url from the payment system.(overrides default value) | | callback_method | string('GET' or 'POST') | The method used for request to callback url.(overrides default value) | | invoice_id | string(255) / number | Internal invoice id from your system. | | description | string(255) | Your description for the payment. | | email | string(255) | Email of the user making the payment. | | mobile | string(15) | Phone of the user making the payment. | | card_pan | string(16) | Limits the card that can be used to make the payment. |

Returns

Instance of PaymentObject or throws Error

VerificationObject.init(amount, authority): VerificationObject

Creates a VerificationObject data class instance.

Arguments

| Argument | Type | Description | |:---------------------:|:--------------------------:|:---------------------------------------------:| | amount | string / number | The peyment amount in Rls. | | authority | string | The returned payment authority value. |

Returns

Instance of PaymentObject or throws Error

paymentRequest(paymentObject): PaymentResponse

Makes the payment request.

Arguments

| Argument | Type | Description | |:---------------------:|:--------------------------:|:---------------------------------------------:| | paymentObject | PaymentObject | Data class with all the required information. |

Returns

Response object as stated in the Novinopay docs.

paymentVerification(verificationObject): VerificationResponse

Makes the payment verification request.

Arguments

| Argument | Type | Description | |:---------------------:|:--------------------------:|:---------------------------------------------:| | verificationObject | VerificationObject | Data class with all the required information. |

Returns

Response object as stated in the Novinopay docs.

Contributing

We welcome contributions from the community! If you have suggestions for how we can improve Your Library Name or you would like to report a bug, please create an issue on the GitHub repository. If you would like to contribute code to the project, please follow the instructions in the CONTRIBUTING.md file.

License

Your Library Name is released under the ISC License. See LICENSE.md for more details.