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

gembapay

v1.0.1

Published

GembaPay — Unified payment gateway for crypto (ETH, BNB, POL, USDC, USDT), Stripe, and PayPal. Non-custodial payments.

Readme

GembaPay

Unified payment gateway for crypto, cards, and PayPal.

Accept ETH, BNB, POL, USDC, USDT, credit cards (via Stripe), and PayPal through a single API. Non-custodial crypto payments — funds go directly to your wallet via smart contract.

npm License: MIT


Features

  • One API, three payment methods — Crypto, Stripe (cards/Apple Pay/Google Pay), PayPal
  • Non-custodial crypto — Payments route directly to your wallet via smart contracts
  • 86+ currencies — Price in any fiat currency, settle in crypto or fiat
  • Multi-chain — Ethereum, BNB Smart Chain, Polygon
  • Test mode built-in — Testnets + sandbox environments for development
  • TypeScript support — Full type definitions included
  • Zero dependencies — Uses only Node.js built-in modules

Install

npm install gembapay

Quick Start

const GembaPay = require('gembapay');

const gembapay = new GembaPay({
  apiKey: 'gembapay_test_your_key',  // test key for development
  webhookSecret: 'your_webhook_secret'
});

// Create a payment
const payment = await gembapay.createPayment({
  orderId: 'ORDER-123',
  amount: 100.00,
  currency: 'EUR'
});

console.log(payment.paymentUrl);
// → https://payment.gembapay.com/checkout/ORDER-123

console.log(payment.allowedMethods);
// → ['crypto', 'stripe', 'paypal']

Usage

Create Payment

const payment = await gembapay.createPayment({
  orderId: 'ORDER-456',
  amount: 49.99,
  currency: 'USD',
  description: 'Premium Plan'
});

// Redirect customer to unified checkout
res.redirect(payment.paymentUrl);

Check Status

const status = await gembapay.getPaymentStatus('ORDER-456');

console.log(status.status);   // 'completed'
console.log(status.network);  // 'bsc', 'stripe', 'paypal', etc.

Webhook Verification

const express = require('express');
const app = express();

app.post('/webhooks/gembapay', express.json(), 
  gembapay.webhookHandler(async (event) => {
    if (event.event === 'payment.completed') {
      console.log(`✓ Order ${event.payment.orderId} paid`);
      console.log(`  $${event.payment.usdAmount} via ${event.payment.network}`);
      await fulfillOrder(event.payment.orderId);
    }
  })
);

Or verify manually:

app.post('/webhooks/gembapay', express.json(), (req, res) => {
  const signature = req.headers['x-gembapay-signature'];
  
  if (!gembapay.verifyWebhook(req.body, signature)) {
    return res.status(401).send('Invalid signature');
  }
  
  const { event, payment, testMode } = req.body;
  // Process event...
  
  res.json({ received: true });
});

Transactions & Stats

const transactions = await gembapay.listTransactions();
const stats = await gembapay.getStats();

Test Mode

Use test API keys (gembapay_test_...) for development. Test mode automatically uses:

| Method | Test Environment | |--------|-----------------| | Crypto | Sepolia, BSC Testnet, Polygon Amoy | | Stripe | Test cards (4242 4242 4242 4242) | | PayPal | Sandbox accounts |

// SDK detects test mode from your API key
const gembapay = new GembaPay({
  apiKey: 'gembapay_test_your_key'
});

console.log(gembapay.isTestMode); // true

Claim free test tokens at Developer Resources.

Express.js Example

const express = require('express');
const GembaPay = require('gembapay');
const app = express();

const gembapay = new GembaPay({
  apiKey: process.env.GEMBAPAY_API_KEY,
  webhookSecret: process.env.GEMBAPAY_WEBHOOK_SECRET
});

// Create payment endpoint
app.post('/api/checkout', express.json(), async (req, res) => {
  const { orderId, amount, currency } = req.body;
  
  try {
    const payment = await gembapay.createPayment({ orderId, amount, currency });
    res.json({ paymentUrl: payment.paymentUrl });
  } catch (err) {
    res.status(err.statusCode || 500).json({ error: err.message });
  }
});

// Webhook endpoint
app.post('/webhooks/gembapay', express.json(),
  gembapay.webhookHandler(async (event) => {
    if (event.event === 'payment.completed') {
      await fulfillOrder(event.payment.orderId);
    }
  })
);

app.listen(3000);

API Reference

new GembaPay(options)

| Option | Type | Required | Description | |--------|------|----------|-------------| | apiKey | string | ✓ | API key from Merchant Dashboard | | webhookSecret | string | | Webhook signing secret | | baseUrl | string | | Custom API URL (default: https://api.gembapay.com) | | timeout | number | | Request timeout in ms (default: 30000) |

Methods

| Method | Description | |--------|-------------| | createPayment(params) | Create payment request → returns paymentUrl | | getPayment(orderId) | Get payment details | | getPaymentStatus(orderId) | Check payment status | | listTransactions(params?) | List merchant transactions | | getStats() | Get merchant statistics | | verifyWebhook(payload, signature) | Verify webhook signature | | parseWebhook(req) | Parse & verify Express request | | webhookHandler(fn) | Express webhook middleware |

Fee Structure

| Method | Fee | |--------|-----| | Crypto (ETH, BNB, POL, USDC, USDT) | 1% | | Stripe (Cards, Apple Pay, Google Pay) | 1% + €0.20 + Stripe fees | | PayPal (Balance, Bank, Pay Later) | 1% + €0.20 + PayPal fees |

Links

Support

License

MIT © GEMBA EOOD