TopupApi NodeJs/Bun
JavaScript/TyepScript Sdk Of Topup API. Your TopUp business partner! A comprehensive TypeScript library for managing orders, stocks, users, nodes, and more.
Installation
Install the package using your preferred package manager:
Quick Start
Features Overview
- Order Management: Place orders, track their status, and manage order combinations.
- Stock Management: Handle inventory with options for adding, buying, and refunding stocks.
- User Management: Manage users and merchants with advanced permission settings.
- 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.
Endpoint: POST /order/
Fetch Orders
Retrieve orders with filtering and pagination options.
Endpoints:
GET /order/orders
GET /order/:orderId
GET /order?offset=0&limit=10
Check Order Status
Track the status of an order.
Endpoint: GET /order/status/:orderId
Manage Order Combinations
Calculate possible combinations for specified order amounts.
Endpoint: POST /order/combination-breaker
Stock Management
Add New Stock
Add new stock items to your inventory.
Endpoint: POST /stock/add
Buy Stock
Purchase stock with specified combinations and quantities.
Endpoint: POST /stock/buy
Refund Stock
Process refunds for purchased stocks.
Endpoint: PATCH /stock/refund
User Management
Register Users
Add a new user to the platform.
Endpoint: POST /user/register
Add Merchants
Add merchants and configure their profit rates.
Endpoint: POST /user/merchant
Update Merchant Details
Update merchant configurations.
Endpoint: PATCH /user/merchant
Node Management (Admin Only)
Configure Nodes
Add and manage nodes in your network.
Endpoints:
POST /node/add
GET /node/
Manage Shards
Configure and monitor shard behavior.
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.