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

oncade-http-client

v0.2.0

Published

A TypeScript API client for Oncade

Readme

Oncade HTTP Client

A modern TypeScript HTTP client for the Oncade platform, providing type-safe access to game commerce APIs including products, purchases, user management, and wallet operations.

Features

  • 🚀 TypeScript First - Full TypeScript support with comprehensive type definitions
  • 🛡️ Type Safe - Strongly typed request/response interfaces
  • 📦 Multiple Formats - ES modules and CommonJS support
  • 🔧 Environment Based - Configuration through environment variables
  • 📚 Well Documented - Clear API documentation and examples

TODOs

[ ] 🧪 Testes - Add test using jest

Installation

npm install oncade-http-client
# or
yarn add oncade-http-client

Quick Start

import { OncadeClient } from 'oncade-http-client';

// Initialize the client
const client = new OncadeClient({
  apiKey: 'your-api-key',
  gameId: 'your-game-id',
});

// Example: Create a product
const product = await client.store.createProduct({
  name: 'Premium Game Pass',
  type: 'purchase',
  fulfillmentType: 'WEBHOOK',
  description: 'Unlock premium features',
  price: 999,
  category: 'game-pass'
});

console.log('Created product:', product.name);

Configuration

The client is configured using environment variables:

ONCADE_SDK_API_KEY=your-api-key
ONCADE_GAME_ID=your-game-id

API Reference

Authentication API

// Initiate account linking
const linkResult = await client.auth.initiateAccountLink({
  email: '[email protected]'
});

Store API

Products

// List all products
const products = await client.store.listProducts({
  category: 'games'
});

// Create a regular product
const product = await client.store.createProduct({
  name: 'Game Item',
  type: 'purchase',
  fulfillmentType: 'WEBHOOK',
  description: 'Item description',
  price: 4.99,
  category: 'items'
});

// Create a UGC (User Generated Content) product
const ugcProduct = await client.store.createUGCProduct('user-ref', {
  name: 'Custom Content',
  type: 'purchase',
  fulfillmentType: 'WEBHOOK',
  description: 'User created content',
  price: 299,
  content: 'Content data'
});

// List creator products
const creatorProducts = await client.store.listCreatorProducts({
  userRef: 'user-reference'
});

// Submit product for review
const submitResult = await client.store.submitProductForReview({
  userRef: 'user-reference',
  productId: 'product-id'
});

// Review product (approve/reject)
const reviewedProduct = await client.store.reviewProduct({
  userRef: 'user-reference',
  productId: 'product-id',
  decision: 'approve'
});

Purchases

// Initiate a purchase
const purchase = await client.store.initiatePurchase({
  userRef: 'user-reference',
  productId: 'product-id',
  amount: 9.99,
  paymentMethod: 'credit_card'
});

// Get purchase details
const purchaseDetails = await client.store.getPurchaseDetails({
  purchaseId: 'purchase-id'
});

User API

// Get user information
const userInfo = await client.user.getUserInfo({
  userRef: 'user-reference'
});

// Get user purchases
const userPurchases = await client.user.getUserPurchases({
  userRef: 'user-reference'
});

Wallet API

// Get user balance
const balance = await client.wallet.getUserBalance({
  userId: 'user-id'
});