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

treasurix-checkout-sdk

v0.1.11

Published

Server-side Treasurix checkout client — payment links authenticated with your dashboard API key; settlements accrue to your treasury pool.

Readme

treasurix-checkout-sdk

Server-side TypeScript client for Treasurix hosted checkout. Create payment links that resolve to your merchant account and treasury (same as the dashboard).

Use only on your backend. Never expose trx_live_ API keys in browsers or mobile clients.

Install

npm install treasurix-checkout-sdk
bun add treasurix-checkout-sdk
pnpm add treasurix-checkout-sdk

Node.js

  • Required: Node ≥ 20.9 (global fetch; align with repo .nvmrc).
  • package.json declares "engines": { "node": ">=20.9.0" }.
  • ESM only: use import { TreasurixCheckoutClient } from "treasurix-checkout-sdk" (or dynamic import()). CommonJS require() is not supported by this package export map.

Check:

node -v

Develop this package in the monorepo

From repo root:

npm install
npm run sdk:build:npm

Or:

cd packages/treasurix-checkout-sdk
npm install
npm run build

(Bun: bun run sdk:build:bun from root, or cd packages/treasurix-checkout-sdk && bun run build.)

Version bumps in this monorepo

If npm version patch fails with Cannot read properties of null (reading 'matches'), npm still may have updated package.json before crashing. That error comes from npm’s arborist reconciling the workspace tree against node_modules/.bun/ (Bun’s layout).

Bump the SDK version from the repo root without triggering that step:

npm pkg set version=0.1.8 -w treasurix-checkout-sdk

Then commit, optionally tag (git tag treasurix-checkout-sdk-v0.1.8), run npm run build -w treasurix-checkout-sdk, and publish from packages/treasurix-checkout-sdk with npm publish.

Environment variables

| Variable | Required | Description | |----------|----------|-------------| | TREASURIX_API_KEY | Yes (typical) | Secret key from the Treasurix dashboard — must start with trx_live_. | | TREASURIX_ORIGIN | No | Origin where Treasurix serves /api/checkout (scheme + host, no trailing path). Omit to use the hosted app (https://treasurix.vercel.app) — application code can pass only apiKey. Set to http://localhost:3000 when your merchant server should call a local Treasurix instance. | | TREASURIX_BASE_URL | No | Legacy alias for TREASURIX_ORIGIN. |

Where pay links point

The public URL for /pay/:slug is resolved server-side from:

  1. Per–API-key “public checkout URL” (Treasurix dashboard → API keys), if set
  2. Else NEXT_PUBLIC_APP_URL on the Treasurix deployment
  3. Else the incoming request origin

The SDK loads this via GET /api/checkout/sdk-config (authenticated with your key) before calling checkout APIs, so integrators do not hard-code the pay-page host.

Example

import { TreasurixCheckoutClient } from "treasurix-checkout-sdk";

const client = new TreasurixCheckoutClient({
  apiKey: process.env.TREASURIX_API_KEY!,
  // treasurixOrigin: optional — defaults to https://treasurix.vercel.app, or TREASURIX_ORIGIN / TREASURIX_BASE_URL
});

const session = await client.createCheckoutSession({
  label: "Invoice #4291",
  amount: "25.00",
  asset: "Mock USDC", // or "SOL"
  customerEmail: "[email protected]", // optional
});

// Hosted pay page for the payer (uses owner-configured public base)
console.log(session.checkoutUrl);

// Optional: fail fast on startup
await TreasurixCheckoutClient.create({ apiKey: process.env.TREASURIX_API_KEY! });

// List sessions for this API key’s merchant
const links = await client.listCheckoutSessions();

// Build a pay URL from a slug (async — uses cached public base)
const url = await client.payUrl(session.slug);

API key

Create keys, set optional public checkout URL per key, and revoke under Dashboard → Developers → API keys on your Treasurix deployment.

License

MIT — see LICENSE.