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

@mnpay/golomt

v1.3.0

Published

Client library for Golomt Bank’s payment API — invoices, inquiries and token confirmation.

Readme

Golomt Package

The Golomt package is a client library for interacting with Golomt's API. It provides a set of functions to handle various operations such as creating invoices, making inquiries, confirming tokens, and more.

Installation

To install the package, use npm or yarn:

npm install @mnpay/golomt

or

yarn add @mnpay/golomt

Usage

First, import the useGolomt function from the package:

import { useGolomt } from '@mnpay/golomt';

Configuration

To use the Golomt client, you need to provide a configuration object. The configuration should include your API endpoint and token:

const config = {
  endpoint: 'https://api.golomt.com', // Optional, defaults to golomtDefaultBaseUrl
  token: 'your-access-token', // Required
  secret: 'your-secret'
};

Initialize the Client

Create an instance of the Golomt client using the useGolomt function:

const golomtClient = useGolomt(config);

Available Methods

The Golomt client provides the following methods:

  • createInvoice: Create a new invoice.
  • inquiry: Make an inquiry request.
  • tokenConfirmation: Confirm a token.
  • payTransaction: Process a payment transaction.
  • checkTransaction: Check the status of a transaction.
  • tokenCreation: Create a new token.
  • getSettlementDetails: Retrieve settlement details.
  • onNotification: Handle notifications.

Example

Here's an example of how to create an invoice:

const invoiceData = {
  // Your invoice data here
};

golomtClient.createInvoice(invoiceData)
  .then(response => {
    console.log('Invoice created:', response);
  })
  .catch(error => {
    console.error('Error creating invoice:', error);
  });

Inquiry Request Example

Here's how to make an inquiry request:

const inquiryParams = {
  transactionId: 'unique-transaction-id',
  checksum: 'calculated-checksum',
};

golomtClient.inquiry(inquiryParams)
  .then(response => {
    console.log('Inquiry Response:', response);
  })
  .catch(error => {
    console.error('Error during inquiry:', error);
  });

Invoice Request Example

Here's how to create an invoice:

const invoiceParams = {
  amount: 1000,
  callback: 'https://your-callback-url.com',
  genToken: 'Y',
  returnType: 'POST',
  transactionId: 'unique-transaction-id',
  socialDeeplink: 'N',
};

golomtClient.createInvoice(invoiceParams)
  .then(response => {
    console.log('Invoice Created:', response);
  })
  .catch(error => {
    console.error('Error creating invoice:', error);
  });

Notification Example

Handling a notification:

const handleNotification = (notificationPayload) => {
  console.log('Notification received:', notificationPayload);
  // Process the notification payload
};

golomtClient.onNotification(handleNotification);

Pay Transaction Request Example

Here's how to process a payment transaction:

const payTransactionParams = {
  amount: '1000',
  checksum: 'calculated-checksum',
  transactionId: 'unique-transaction-id',
  lang: 'en',
  token: 'your-token',
};

golomtClient.payTransaction(payTransactionParams)
  .then(response => {
    console.log('Payment Transaction Response:', response);
  })
  .catch(error => {
    console.error('Error processing payment transaction:', error);
  });

Token Creation Request Example

Here's how to create a token:

const tokenCreationParams = {
  callback: 'https://your-callback-url.com',
  checksum: 'calculated-checksum',
  returnType: 'POST',
  transactionId: 'unique-transaction-id',
};

golomtClient.tokenCreation(tokenCreationParams)
  .then(response => {
    console.log('Token Created:', response);
  })
  .catch(error => {
    console.error('Error creating token:', error);
  });

Check Transaction Request Example

Here's how to check a transaction:

const checkTransactionParams = {
  checksum: 'calculated-checksum',
  transactionId: 'unique-transaction-id',
};

golomtClient.checkTransaction(checkTransactionParams)
  .then(response => {
    console.log('Check Transaction Response:', response);
  })
  .catch(error => {
    console.error('Error checking transaction:', error);
  });

Request and Response Documentation

Inquiry Request

Request Parameters:

  • transactionId (string): Unique transaction ID provided by the organization.
  • checksum (string): A checksum calculated as transactionId + transactionId.

Response Parameters:

  • status (string): Status of the payment, either 'SENT' or 'PENDING'.
  • amount (string): Amount deducted from the card.
  • bank (string): Name of the card-issuing bank.
  • cardHolder (string): Name of the cardholder.
  • cardNumber (string): Card number used for the transaction.
  • errorDesc (string): Description of the status code.
  • errorCode (string): Status code of the transaction.
  • transactionId (string): Merchant's transaction ID.
  • checksum (string): Checksum calculated as transactionId + errorCode + amount + token.
  • token (string, optional): Token number representing the card, present only if the token is created.

Invoice Request

Request Parameters:

  • amount (number): Amount to be deducted from the card.
  • callback (string): Merchant's URL for callback or redirect.
  • checksum (string, optional): Checksum calculated as transactionId + amount + returnType + callback.
  • genToken (YesNo): 'Y' to generate a token after the transaction, 'N' otherwise.
  • returnType (string): Method for redirecting to the merchant's URL, either 'POST', 'GET', or 'MOBILE'.
  • transactionId (string): Merchant's transaction ID.
  • socialDeeplink (YesNo): 'Y' to receive a social pay deeplink, 'N' otherwise.

Response Parameters:

  • checksum (string): Checksum generated by the bank.
  • transactionId (string): Merchant's transaction ID.
  • invoice (string): Invoice number generated for the transaction.
  • socialDeeplink (string): Social pay deeplink.

Notification

Payload Parameters:

  • amount (string): Amount involved in the transaction.
  • bank (string): Name of the bank.
  • errorDesc (string): Description of any error.
  • checksum (string): Checksum for verification.
  • errorCode (string): Error code if any.
  • cardHolder (string): Name of the cardholder.
  • transactionId (string): Transaction ID.
  • cardNumber (string): Card number used.
  • token (string, optional): Token number, if available.

Pay Transaction Request

Request Parameters:

  • amount (string): Amount to be paid.
  • checksum (string): Checksum for verification.
  • transactionId (string): Transaction ID.
  • lang (string): Language code.
  • token (string): Token for the transaction.

Response Parameters:

  • amount (string): Amount involved in the transaction.
  • errorDesc (string): Description of any error.
  • checksum (string): Checksum for verification.
  • errorCode (string): Error code if any.
  • cardNumber (string): Card number used.
  • transactionId (string): Transaction ID.

Token Creation Request

Request Parameters:

  • callback (string): Callback URL.
  • checksum (string): Checksum for verification.
  • returnType (string): Return type for the callback.
  • transactionId (string): Transaction ID.

Response Parameters:

  • checksum (string): Checksum for verification.
  • transactionId (string): Transaction ID.
  • invoice (string): Invoice number.

Check Transaction Request

Request Parameters:

  • checksum (string): Checksum for verification.
  • transactionId (string): Transaction ID.

Response Parameters:

  • amount (string): Amount involved in the transaction.
  • errorDesc (string): Description of any error.
  • checksum (string): Checksum for verification.
  • errorCode (string): Error code if any.
  • transactionId (string): Transaction ID.
  • cardNumber (string): Card number used.
  • token (string, optional): Token number, if available.