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

@paymentsgate/nodejs-secure-api

v0.1.5

Published

PaymentsGate API client

Readme

Payments Gate NodeJS Client

This is a complete NodeJS module for communication with paymentsgate service.

Features

  • PayIn orders with out own widget (redirect)
  • Payin H2H (sync and async mode)
  • PayOut orders
  • Quotes (pre-payout quote calculate)
  • Account balance with pending funds
  • TRC20 deposit address requests

Dependencies

  • dayjs - lightweight library for date-time manipulation
  • jwt-decode - JWT parser

Usage

npm i @paymentsgate/nodejs-secure-api
import { ApiClient } from '@paymentsgate/nodejs-secure-api'; 

const client = new ApiClient({
  endpoint: 'https://api.example.com',
  filepath: './credentials.json'
});

//// .......... ////

const result = await client.createPayIn({
  amount: 10,
  currency: 'AZN',
  invoiceId: String(new Date().getTime()),
  clientId:  String(new Date().getTime()),
  successUrl: 'https://example.com/success',
  failUrl: 'https://example.com/fail',
  type: 'p2p'
});

The credentials.json file is used to connect to the client and contains all necessary data to use the API. This file can be obtained in your personal cabinet, in the service accounts section. Follow the instructions in the documentation to issue new keys. If you already have keys, but you don't feel comfortable storing them in a file, you can use client initialization via variables. In this case, the key data can be stored in external storage instead of on the file system:

import { ApiClient } from '@paymentsgate/nodejs-secure-api'; 

const client = new ApiClient({
  endpoint: 'https://api.example.com',
  accountId: '00000000-4000-4000-0000-00000000000a',
  publicKey: 'LS0tLS1CRUdJTiBSU0EgUFJJVkFUNSUlFb3dJQk....',
  privateKey: 'LS0tLS1CRUdJTiklqQU5CZ2txaGtpRzl3MEJBUUV....'
});

*It is important to note that the data format for key transfer is base46.

Examples

Request QUOTE

const result = await client.quote({
  currencyFrom: 'USDT',
  currencyTo: 'AZN',
  amount: 5.20,
});

Response:

{
  id: "6462c5d3-3a50-4b7f-aae4-8e2e909d7a35"
  finalAmount: 8.41,
  direction: 'C2F',
  fullRate: 1.78,
  fullRateReverse: 0.021,
  fees: 0.5,
  fees_percent: 0.012,
  quotes: [
    {
      currencyFrom: 'USDT',
      currencyTo: 'AZN',
      pair: 'USDT/AZN',
      rate: 1.69
    },
  ]
}

Use QUOTE response for next request

const result = await client.createPayOut({
  currencyTo: 'EUR',
  amount: 5.20,
  baseCurrency: 'fiat',
  feesStrategy: 'add',
  invoiceId: 'INVOICE-112123123',
  recipient: {
    account_number: '4000000000000012',
    account_owner: 'CARD HOLDER',
    type: 'card'
  },
  quoteId: '6462c5d3-3a50-4b7f-aae4-8e2e909d7a35'
});

Available currencies

EUR USD TRY CNY JPY GEL AZN INR AED KZT UZS TJS EGP PKR IDR BDT GBP RUB THB KGS PHP ZAR ARS GHS KES NGN AMD

Available payment methods

visa mastercard m10 mpa sbp upi ibps bizum kgsphone krungthainext kztphone accountbdt alipay accountegp accountphp maya mir gcash banktransferphp banktransferars freecharge instapay vodafonecash