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

@meru.app/checkout-node

v0.1.0

Published

Server-side SDK for Meru Checkout — create and retrieve crypto checkout sessions with your secret key.

Readme

@meru.app/checkout-node

Server-side SDK for Meru Checkout. Create and retrieve crypto checkout sessions (crypto exchanges + QR Bolivia) with your secret key.

Use this only on your backend — it holds sk_live_…. The customer-facing part (@meru.app/checkout-react) only ever receives the session id/url.

Install

npm install @meru.app/checkout-node
# Node 18+ (uses global fetch)

Create a session

import { MeruCheckout } from '@meru.app/checkout-node';

const meru = new MeruCheckout(process.env.MERU_SECRET_KEY); // sk_live_…

const session = await meru.checkouts.create({
  amountFiat: 50,
  fiatCurrency: 'USD',
  paymentMethod: 'qr-bolivia', // or 'crypto-exchanges', or omit to let the customer choose
  reference: 'order_123',
  successUrl: 'https://your-site.com/thanks',
  cancelUrl: 'https://your-site.com/cart',
});

// Redirect the customer to session.url, or pass session.id to the React SDK.
console.log(session.id, session.url);

Express example

app.post('/checkout', async (req, res) => {
  const session = await meru.checkouts.create({
    amountFiat: req.body.amount,
    reference: req.body.orderId,
  });
  res.json({ id: session.id, url: session.url });
});

Idempotency

Pass an idempotency key so a retried create (network blips, retries) returns the same session instead of creating a duplicate — scoped to your account:

const session = await meru.checkouts.create(
  { amountFiat: 50, reference: 'order_123' },
  { idempotencyKey: 'order_123' }, // any stable unique string per logical request
);

Reconcile status

const checkout = await meru.checkouts.retrieve(session.id);
if (checkout.status === 'succeeded') {
  // fulfill the order — this is the authoritative check
}
// 'created' | 'pending' | 'processing' | 'succeeded' | 'failed' | 'expired'

Configuration

new MeruCheckout({
  apiKey: process.env.MERU_SECRET_KEY,        // or the first positional arg
  baseUrl: 'https://checkout-api.meru.com',    // default; override for sandbox/self-host
  timeoutMs: 20000,
  // fetch: customFetch,                        // optional (defaults to global fetch)
});

Errors

Non-2xx responses throw MeruApiError with .status and .body:

import { MeruApiError } from '@meru.app/checkout-node';

try {
  await meru.checkouts.create({ amountFiat: 50 });
} catch (e) {
  if (e instanceof MeruApiError) {
    console.error(e.status, e.body);
  }
}

API

| Method | Calls | Returns | | --- | --- | --- | | meru.checkouts.create(params) | POST /v1/checkouts | CheckoutSession (with url) | | meru.checkouts.retrieve(id) | GET /checkouts/:id | CheckoutSession |

CreateCheckoutParams: amountFiat?, fiatCurrency?, paymentMethod? ('crypto-exchanges' | 'qr-bolivia'), token? ('USDC' | 'USDT'), description?, reference?, clientReference?, successUrl?, cancelUrl?, metadata?.