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

fungies

v0.5.2

Published

Official CLI for the Fungies Merchant of Record API

Readme


Official command-line interface for the Fungies API.

What is Fungies?

Fungies is a Merchant of Record platform built for digital product sellers — game developers, SaaS founders, and indie creators. It handles the entire payment infrastructure for you: checkout, tax calculation, invoicing, subscriptions, refunds, and global compliance — so you can sell digital products without setting up Stripe, dealing with VAT, or incorporating in every country.

With Fungies you can:

  • Sell game keys, digital downloads, one-time products, and SaaS subscriptions
  • Accept payments globally with automatic tax handling (VAT, GST, sales tax)
  • Manage customers, orders, and subscription billing programmatically
  • Embed checkout (overlay, hosted, or embedded) directly into your website or app
  • Get paid via Stripe, PayPal, crypto/stablecoins, and more

Full API docs: docs.fungies.io · Help center: help.fungies.io


What is fungies-cli?

fungies-cli lets you manage your entire Fungies store from the terminal. Query orders, manage products and offers, handle subscriptions, export data, and automate workflows — without opening a browser.

Useful for:

  • Support workflows — look up orders and customers by ID instantly
  • Data exports — pipe to CSV for spreadsheets or analytics
  • Automation — shell scripts for bulk key uploads, subscription management
  • Developers — explore and test the API without writing code

Installation

npm install -g fungies

Or run without installing:

npx fungies [command]

Requirements: Node.js 18+


Quick Start

1. Get your API keys

Go to your Fungies DashboardDevelopers → API Keys and generate your keys.

| Key | Prefix | Required for | |-----|--------|-------------| | Public Key | pub_ | All read operations | | Secret Key | sec_ | Write operations (create, update, archive) |

2. Authenticate

fungies auth set --public-key pub_your_key_here --secret-key sec_your_key_here

Read-only mode (no secret key):

fungies auth set --public-key pub_your_key_here

3. Verify the connection

fungies auth whoami
# ✓ Connected | Public: pub_****abc= | Secret: sec_****xyz=

Commands

Authentication

fungies auth set --public-key pub_... --secret-key sec_...
fungies auth whoami    # Verify connection
fungies auth clear     # Remove saved keys

Products

In Fungies, a Product is the top-level item you sell. Products can have multiple Variants (configurations — e.g. Standard Edition, Deluxe Edition) and each variant can have multiple Offers (prices — e.g. €9.99 one-time, €2.99/month). Prices always live on Offers, never directly on Products or Variants.

Product types:

  • OneTimePayment — standard one-time purchase
  • Subscription — recurring billing (SaaS, memberships)
  • Membership — access-based product
  • GameKey — digital key distribution (Steam keys, etc.)
fungies products list
fungies products get <id>
fungies products create
fungies products update <id>
fungies products archive <id>       # Soft delete — reversible; also archives associated offers
fungies products duplicate <id>     # Copies product + variants (offers not duplicated)

📖 Help: Add Game Keys · Add Subscription Product · Variants


Offers

An Offer defines exactly how a product can be purchased — price, currency, billing interval, and (for game keys) key inventory. A product must have at least one offer before customers can buy it.

Offer examples:

  • Starter Plan — $19/month
  • Professional Plan — $299/year
  • Game Key (Global) — €9.99 one-time
fungies offers list
fungies offers list --product-id <product-id>    # Filter by product
fungies offers get <id>
fungies offers create
fungies offers update <id>
fungies offers archive <id>                       # Soft delete — existing subscriptions on this offer continue

Managing license/game keys on an offer:

fungies offers keys add <offer-id> --keys "KEY1,KEY2,KEY3"    # Add keys to inventory
fungies offers keys remove <offer-id> <key-id>                # Remove a specific unsold key

Note: Keys are automatically assigned to customers at purchase. Only unsold keys can be removed — keys already delivered to customers are preserved.

📖 Help: Add Game Keys · Variants of the Product


Orders

An Order is created when a customer completes a purchase — one-time buy, free claim, or first subscription payment. Recurring subscription renewal payments are tracked as separate Payment objects, not new orders.

fungies orders list
fungies orders list --status PAID         # PAID | PENDING | CANCELLED | REFUNDED | FAILED
fungies orders list --limit 50
fungies orders list --from 2025-01-01     # Filter by creation date
fungies orders get <id>
fungies orders get <order-number>         # Also accepts the short order number (e.g. 9XMrb9HkzBPcLIaJ)
fungies orders cancel <id>

Note: Cancelling an order changes its status to CANCELLED but does not automatically issue a refund. To refund a paid order, use the Fungies Dashboard or process through your payment provider directly.

📖 Help: Orders APIs · Cancel Order


Payments

A Payment represents an individual financial transaction — one-time purchases, subscription renewals, refunds, or extra charges. Each payment includes charge details, invoice info, and the customer who paid.

Payment types you'll see:

  • one_time — single purchase
  • subscription_initial — first payment of a new subscription
  • subscription_interval — recurring subscription renewal
  • subscription_extra — additional charge on top of subscription (usage-based billing)
  • claim_free — free product claim
fungies payments list
fungies payments list --limit 50
fungies payments list --from 2025-01-01
fungies payments get <id>

Subscriptions

Fungies handles the full subscription lifecycle: automated billing every interval, transactional emails, invoice generation, and management (pause, cancel, upgrade/downgrade). You can also charge customers extra on top of an existing subscription for usage-based billing (credits, API calls, storage, etc.).

fungies subscriptions list
fungies subscriptions list --status active    # active | canceled | all
fungies subscriptions get <id>
fungies subscriptions cancel <id>
fungies subscriptions pause <id>              # Pauses payment collection only — access is maintained
fungies subscriptions charge <id> --amount 200 --currency EUR   # Charge €2.00 on top of subscription

Note on pause: Pausing a subscription stops payment collection but does NOT affect subscription periods or access to the product. The customer retains access while paused.

Note on charge: Use this for usage-based billing — charge extra for credits, data, API calls, etc. on top of the customer's existing subscription. A separate invoice is generated for each charge.

📖 Help: Managing Subscriptions via API · Editing & Pausing Subscriptions · Additional charges on top of Subscriptions · Upgrade/Downgrade Plans


Discounts

Fungies supports two types of discounts:

  • Coupon codes — customers enter a code at checkout (e.g. SUMMER50)
  • Sale discounts — automatically applied based on configured conditions

Both support fixed amount and percentage reductions.

fungies discounts list
fungies discounts list --status active     # active | archived
fungies discounts get <id>
fungies discounts create
fungies discounts update <id>
fungies discounts archive <id>             # Soft delete — reversible

Users

Users are the customers who have purchased from your store. The API lets you manage user accounts programmatically — create users, update billing details, look up purchase history, or archive accounts.

fungies users list
fungies users list --search [email protected]    # Filter by email
fungies users get <id>
fungies users create
fungies users update <id>
fungies users archive <id>                       # Soft delete — reversible
fungies users unarchive <id>                    # Restore archived user
fungies users inventory <id>                    # View all purchases: products, subscriptions, access items

Note on users create: The email must be unique. If you provide billingDetails, ensure countryCode is valid and postalCode is included for US, CA, UA, and IN.

📖 Help: Managing & Creating Users via API


Webhooks

Fungies sends webhook events to your server for real-time notifications — payments, subscription changes, refunds, and more.

Supported events:

| Event | Fires when | |-------|-----------| | payment.success | Payment successfully processed | | payment.refunded | Payment or partial payment refunded | | payment.failed | Payment attempt fails | | subscription.created | New subscription created | | subscription.interval | Subscription renewed successfully | | subscription.updated | Subscription modified (upgrade/downgrade/pause) | | subscription.cancelled | Subscription cancelled |

# Start a local webhook listener (like stripe listen)
fungies webhooks listen

# Listen on a custom port and path, with signature verification
fungies webhooks listen --port 3000 --path /webhooks/fungies --secret sec_your_key

# Only show specific events
fungies webhooks listen --filter-event payment.success --filter-event subscription.created

# List all supported event types
fungies webhooks events

# Verify a webhook signature (useful for debugging)
fungies webhooks verify --payload '{"event":"payment.success"}' \
  --signature <sig-from-header> \
  --secret sec_your_key

Setting up local development with webhooks:

  1. Start the listener: fungies webhooks listen --secret sec_your_key
  2. Expose it publicly: ngrok http 4242
  3. Copy the ngrok HTTPS URL → paste into Fungies Dashboard → Developers → Webhooks
  4. Events appear in your terminal as they fire

📖 Help: Using Webhooks · Webhook Event Types


Checkout Elements

Checkout Elements are embeddable or hosted checkout experiences you can integrate into your website or app. They handle the full checkout flow: payment collection, tax calculation, and order creation. There are three types:

  • Overlay Checkout — pop-up buy button you embed anywhere on a page
  • Hosted Checkout — standalone checkout page hosted by Fungies
  • Embedded Checkout — checkout embedded directly inside your app
fungies elements list
fungies elements create
fungies elements open <id>

📖 Help: Overlay Checkout · Hosted Checkout · Embedded Checkout


Output Formats

All list commands support --format:

fungies orders list --format table    # Default — human-readable table
fungies orders list --format json     # Raw JSON
fungies orders list --format csv      # CSV for spreadsheets

Examples

Look up an order by ID or order number

fungies orders get 2d448c93-5945-416c-916a-90aef8cea058
fungies orders get 9XMrb9HkzBPcLIaJ

List all paid orders

fungies orders list --status PAID --limit 100

Export all payments to CSV

fungies payments list --limit 100 --format csv > payments.csv

Find a customer by email

fungies users list --search [email protected]

View everything a customer has purchased

fungies users inventory <user-id>

List active subscriptions

fungies subscriptions list --status active

Export subscriptions as JSON and filter with jq

fungies subscriptions list --format json | jq '.items[] | {id, status, userId}'

Charge a customer extra on top of their subscription (usage billing)

# Charge €2.00 for API overage
fungies subscriptions charge <subscription-id> --amount 200 --currency EUR

Add game keys to an offer in bulk

fungies offers keys add <offer-id> --keys "XXXX-YYYY-ZZZZ,AAAA-BBBB-CCCC"

Check all offers for a specific product

fungies offers list --product-id <product-id>

List all discount codes with usage stats

fungies discounts list --format table

Archive an expired discount

fungies discounts archive <discount-id>

Resources


License

MIT