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

topupapi

v0.9.1

Published

Your Topup Business partner

Readme

TopUpAPI

Your TopUp business partner! A comprehensive TypeScript library for managing orders, stocks, users, nodes, and more.

Website

T4B.Top

Installation

Install the package using your preferred package manager:

npm install topupapi
# or
pnpm add topupapi

Quick Start

import { TopUpClient } from 'topupapi';

const client = new TopUpClient({
  token: 'YOUR_API_TOKEN'
});

Features Overview

  1. Order Management: Place orders, track their status, and manage order combinations.
  2. Stock Management: Handle inventory with options for adding, buying, and refunding stocks.
  3. User Management: Manage users and merchants with advanced permission settings.
  4. Node & Shard Management: Configure and monitor nodes and shards for efficient system operation.

Order Management

Place New Orders

Create orders with game details, amount, and callback URLs.

const order = await client.order.place({
  game: "GAME", // 'FREE_FIRE' | 'FREE_FIRE_SHELL' | 'FREE_FIRE_SG' | 'FREE_FIRE_ID
  amount: "100", // Diamond amount
  uid: "PLAYER_UID",
  callbackUrl: "https://your-callback-url.com",
  quantity: 1 // optional
});

Endpoint: POST /order/


Fetch Orders

Retrieve orders with filtering and pagination options.

// Get all orders
const allOrders = await client.order.fetch();

// Get a specific order
const order = await client.order.fetch("ORDER_ID");

// Get paginated orders
const paginatedOrders = await client.order.fetch({
  offset: 0,
  limit: 10
});

Endpoints:

  • GET /order/orders
  • GET /order/:orderId
  • GET /order?offset=0&limit=10

Check Order Status

Track the status of an order.

const status = await client.order.status({ orderId: "ORDER_ID" });

Endpoint: GET /order/status/:orderId


Manage Order Combinations

Calculate possible combinations for specified order amounts.

const combinations = await client.order.combinationBreaker({
  amount: "100",
  game: "GAME", // 'FREE_FIRE' | 'FREE_FIRE_SHELL' | 'FREE_FIRE_SG' | 'FREE_FIRE_ID
});

Endpoint: POST /order/combination-breaker


Stock Management

Add New Stock

Add new stock items to your inventory.

const newStock = await client.stocks.add({
  game: "GAME", // 'FREE_FIRE' | 'FREE_FIRE_SHELL' | 'FREE_FIRE_SG' | 'FREE_FIRE_ID
  codeTxt: "YOUR_CODE_TEXT",
  amount: 100,
  price: "10000"
});

Endpoint: POST /stock/add


Buy Stock

Purchase stock with specified combinations and quantities.

const purchase = await client.stocks.buy({
  game: "GAME", // 'FREE_FIRE' | 'FREE_FIRE_SHELL' | 'FREE_FIRE_SG' | 'FREE_FIRE_ID
  combination: [100, 200],
  quantity: 1
});

Endpoint: POST /stock/buy


Refund Stock

Process refunds for purchased stocks.

const refund = await client.stocks.refund({
  game: "GAME", // 'FREE_FIRE' | 'FREE_FIRE_SHELL' | 'FREE_FIRE_SG' | 'FREE_FIRE_ID
  checkCode: ["CODE_1", "CODE_2"]
});

Endpoint: PATCH /stock/refund


User Management

Register Users

Add a new user to the platform.

const user = await client.users.register({
  name: "John Doe"
});

Endpoint: POST /user/register


Add Merchants

Add merchants and configure their profit rates.

const merchant = await client.users.addMerchant({
  userId: 123,
  profitRate: 0.15
});

Endpoint: POST /user/merchant


Update Merchant Details

Update merchant configurations.

const updated = await client.users.updateMerchant({
  userId: 123,
  profitRate: 0.20
});

Endpoint: PATCH /user/merchant


Node Management (Admin Only)

Configure Nodes

Add and manage nodes in your network.

const node = await client.nodes.add({
  endPoint: "192.168.1.1",
  connectionToken: "YOUR_CONNECTION_TOKEN"
});

Endpoints:

  • POST /node/add
  • GET /node/

Manage Shards

Configure and monitor shard behavior.

const updatedConfig = await client.nodes.updateShardConfig({
  flowGate: true,
  flowGateMode: "LIMIT",
  flowGateLimit: 1000
});

Endpoints:

  • GET /node/shards/config
  • PATCH /node/shards/config

Response Types

The library provides strongly typed responses for all operations:

  • Orders: Order, OrderStatus, OrderState
  • Stocks: StockAddResponse, StockBuyResponse, StockRefundResponse
  • Users: User, Merchant
  • Nodes: Node, ShardConfigDto

Refer to the types documentation for detailed schemas.


Version History

Check the Changelog for version details and updates.


License

This project is licensed under the MIT License.

For more details and documentation, visit T4B.Top.