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

@flintpay/node

v0.1.0

Published

Official Node.js and TypeScript SDK for the Flint payments API: orders, payment intents, checkout sessions, payment links, invoices, subscriptions, and webhooks.

Readme

@flintpay/node

Official Node.js and TypeScript SDK for the Flint payments API.

Use it to create and manage:

  • customers
  • orders
  • payment intents
  • checkout sessions
  • payment links
  • invoices
  • subscriptions
  • webhooks
  • settings, analytics, API keys, devices, merchants, and users

Install

pnpm add @flintpay/node

Node >=18 is required.

Authentication

Create an API key in the Flint dashboard, then use it from your server:

import { Flint } from "@flintpay/node";

const flint = new Flint({
  apiKey: process.env.FLINT_API_KEY!,
});

By default the SDK talks to https://api.withflintpay.com.

Quick Start

Create an order, then create a payment intent from that order:

import { Flint } from "@flintpay/node";

const flint = new Flint({
  apiKey: process.env.FLINT_API_KEY!,
});

const order = await flint.orders.create({
  lineItems: [
    {
      name: "Coffee",
      quantity: 1,
      unitPriceMoney: { amount: 500, currency: "USD" },
    },
    {
      name: "Blueberry Muffin",
      quantity: 1,
      unitPriceMoney: { amount: 425, currency: "USD" },
    },
  ],
  buyerNote: "Pickup order",
});

const paymentIntent = await flint.paymentIntents.create({
  orderId: order.orderId,
});

Common Flows

Create a Customer

const customer = await flint.customers.create({
  name: "Ada Lovelace",
  email: "[email protected]",
  phoneNumber: "+15551234567",
});

Create a Payment Link

const paymentLink = await flint.paymentLinks.create({
  name: "Spring Merch Drop",
  lineItems: [
    {
      key: "shirt",
      name: "Limited Tee",
      quantity: 1,
      amountMoney: { amount: 3500, currency: "USD" },
    },
  ],
});

Create a Checkout Session

const session = await flint.checkoutSessions.create({
  quickPay: {
    lineItems: [
      {
        name: "Event Ticket",
        quantity: 2,
        unitPriceMoney: { amount: 2500, currency: "USD" },
      },
    ],
  },
});

Create an Invoice

const invoice = await flint.invoices.create({
  quickPay: {
    lineItems: [
      {
        name: "Consulting",
        quantity: 1,
        unitPriceMoney: { amount: 25000, currency: "USD" },
      },
    ],
  },
  recipientEmail: "[email protected]",
  reference: "INV-2026-001",
});

const sent = await flint.invoices.send(invoice.invoiceId);

Manage Webhooks

const endpoint = await flint.webhooks.create({
  url: "https://example.com/flint/webhooks",
  subscribedEvents: ["payment_intent.succeeded"],
  description: "Production webhook endpoint",
  enabled: true,
});

const rotated = await flint.webhooks.rotateWebhookSecret(
  endpoint.webhookEndpointId
);

Pagination

List endpoints return a FlintList, which supports both page access and async iteration:

for await (const customer of flint.customers.list({ limit: 25 })) {
  console.log(customer.customerId, customer.email);
}

Errors

SDK requests throw FlintError with normalized error types and remediation metadata when available:

import { FlintError } from "@flintpay/node";

try {
  await flint.orders.get("ord_does_not_exist");
} catch (error) {
  if (error instanceof FlintError) {
    console.error(error.type, error.code, error.message);
  }
}

Configuration

const flint = new Flint({
  apiKey: process.env.FLINT_API_KEY!,
  baseUrl: "https://api.staging.withflintpay.com",
  timeoutMs: 10_000,
  maxRetries: 2,
});

Defaults:

  • baseUrl: https://api.withflintpay.com
  • timeoutMs: 30000
  • maxRetries: 2

Supported Resources

  • customers
  • orders
  • items
  • coupons
  • paymentLinks
  • paymentIntents
  • paymentMethods
  • refunds
  • checkoutSessions
  • subscriptionPlans
  • subscriptions
  • settings
  • analytics
  • apiKeys
  • devices
  • invoices
  • merchants
  • users
  • webhooks

Current Scope

This SDK covers Flint’s public API-key-authenticated commerce, checkout, invoice, subscription, analytics, account, and webhook surfaces.

Developer bootstrap is separate because it uses a different pre-API-key authentication flow.

Development

pnpm build
pnpm typecheck
pnpm test
pnpm test:contract