Voltar ao ranking

getpaykit/paykit

TypeScriptpaykit.sh

The billing framework for TypeScript. Products in code, handles Stripe, webhooks, and usage state, runs in your app.

billingcreemfintechpolarpricingsaasstripepaykitpaymentssdktypescript
Crescimento de estrelas
Estrelas
1k
Forks
43
Crescimento semanal
Issues
31
5001k
fev. de 26mar. de 26mai. de 26jul. de 26
Artefatosnpmnpm install paykit
README

PayKit

The billing framework for TypeScript

Define plans in code. Gate features. Track usage. Webhooks handled for you.

Website · Docs · Discord · Twitter

npm version License npm downloads


What is PayKit?

PayKit is an embedded billing framework for TypeScript apps. It sits inside your app, uses your database, and gives you a single API to manage products, subscriptions, entitlements, and usage billing without touching provider dashboards.

import { createPayKit, feature, plan } from "paykitjs";

const messages = feature({ id: "messages", type: "metered" });

const free = plan({
  id: "free",
  group: "base",
  default: true,
  includes: [messages({ limit: 100, reset: "month" })],
});

const pro = plan({
  id: "pro",
  group: "base",
  price: { amount: 19, interval: "month" },
  includes: [messages({ limit: 2_000, reset: "month" })],
});

export const paykit = createPayKit({
  stripe: {
    secretKey: process.env.STRIPE_SECRET_KEY!,
    webhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
  },
  database: process.env.DATABASE_URL!,
  products: [free, pro],
});

Getting started

npx paykitjs init

Or follow the installation guide.

Why PayKit

Billing in the TypeScript ecosystem is either handled through low-level provider SDKs that require a lot of glue code, or through hosted platforms that own your billing data and sit between you and your customers. PayKit takes a different approach: it's an open-source framework that runs inside your app, keeps billing state in your own database, and handles the Stripe lifecycle so you don't have to.

Contribution

PayKit is free and open source project licensed under the MIT License. You are free to do whatever you want with it.

You can help continue its development by:

Security

If you discover a security vulnerability within PayKit, please send an email to security@paykit.sh.

All reports will be promptly addressed, and you'll be credited accordingly.

Repositórios relacionados
getlago/lago

Open Source Metering and Usage Based Billing API ⭐️ Consumption tracking, Subscription management, Pricing iterations, Payment orchestration & Revenue analytics

GoGo ModulesGNU Affero General Public License v3.0billingfintech
getlago.com
10.2k705
akaunting/akaunting

Online Accounting Software

PHPPackagistOtherphplaravel
akaunting.com
10k2.9k
hexclave/hexclave

The user infrastructure platform. You choose the frontend, backend, and database. Hexclave handles everything else.

TypeScriptnpmOtherauthenticationnextjs
hexclave.com
6.8k521
killbill/killbill

Open-Source Subscription Billing & Payments Platform

JavaMavenApache License 2.0killbillbilling
killbill.io
5.6k941
ever-co/ever-gauzy

Ever® Gauzy™ - Open Business Management Platform (ERP/CRM/HRM/ATS/PM) - https://gauzy.co

TypeScriptnpmGNU Affero General Public License v3.0hrsalary
gauzy.co
3.8k789
flexprice/flexprice

Usage-based pricing and billing for developers 🔓 Cloud or self-hosted ⚙️ No-code UI 💰 Realtime usage metering 🎟 Credits & top-ups 🔑 Control feature access

GoGo ModulesGNU Affero General Public License v3.0billingclickhouse
flexprice.io
3.6k187
hyochan/react-native-iap

In App Purchase module for React Native that confirms OpenIAP

TypeScriptnpmMIT Licensereact-nativeamazon
hyochan.github.io/react-native-iap
3.2k694
InvoicePlane/InvoicePlane

A self-hosted open source application for managing your invoices, clients and payments.

PHPPackagistOtherphpinvoices
invoiceplane.com
3.1k865
naiveHobo/InvoiceNet

Deep neural network to extract intelligent information from invoice documents.

PythonPyPIMIT Licenseinvoiceinvoice-management
2.7k412
laravel/cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

PHPPackagistMIT Licenselaravelstripe
laravel.com/docs/billing
2.5k741
openmeterio/openmeter

Metering and Billing for AI, API and DevOps. Collect and aggregate millions of usage events in real-time and enable usage-based billing.

GoGo ModulesApache License 2.0kafkametering
openmeter.io
2.1k197
uselotus/lotus

Open Source Pricing & Packaging Infrastructure

PythonPyPIMIT Licensepricingpython
uselotus.io
1.8k134