项目 / getpaykit/paykit

getpaykit/paykit

行业推荐
语言 TypeScript标签 billingfintechpricingsaasstripepaykitpaymentssdktypescript数据更新 2026-11-22 06:48:52 · 仓库 2026-11-21

一段话介绍

面向 TypeScript 应用的嵌入式 Stripe 计费框架,在应用内用代码定义产品与套餐,并处理订阅、权益、用量计费和 Webhook。计费状态保存在你自己的数据库中。可用 `npx paykitjs init` 初始化,或按[安装指南](https://paykit.sh/docs/get-started/installation)接入;文档见[paykit.sh/docs](https://paykit.sh/docs)。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
Build Stripe billing without the glue code. Products in code, webhooks handled, billing state in your app.
1,074累计星
44Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

支付清结算与对账

适配系统:支付中台、清结算系统 · 得分 2.6

提供支付编排/渠道路由与对账能力,可嵌入交易系统完成收单、清分与差错处理。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
安装或使用说明见 https://paykit.sh/docs/get-started/installation。
特点或设计要点
PayKit 定位为开源计费框架,弥补 TypeScript 生态中低层计费 SDK 胶水代码多、托管平台掌控计费数据的不足,运行在用户自身环境中。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-09-27 · 语言 TypeScript · 贡献者 —
typescript

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 4,132 字节。

<br>

<p align="center">
  <a name="readme-top"></a>
  <a href="https://paykit.sh">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="apps/web/public/brand/logo-dark.svg">
      <source media="(prefers-color-scheme: light)" srcset="apps/web/public/brand/logo-light.svg">
      <img alt="PayKit" src="apps/web/public/brand/logo-light.svg" height="100">
    </picture>
  </a>
</p>

<h3 align="center">Build Stripe billing without the glue code</h3>

<p align="center">
  Define plans in code. Gate features. Track usage. Webhooks handled for you.
</p>

<p align="center">
  <a href="https://paykit.sh"><strong>Website</strong></a> ·
  <a href="https://paykit.sh/docs"><strong>Docs</strong></a> ·
  <a href="https://discord.gg/nzy9NPpFNU"><strong>Discord</strong></a> ·
  <a href="https://x.com/paykit_sh"><strong>Twitter</strong></a>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/paykitjs"><img src="https://img.shields.io/npm/v/paykitjs?style=flat-square&color=333" alt="npm version"></a>
  <a href="https://github.com/getpaykit/paykit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/getpaykit/paykit?style=flat-square&color=333" alt="License"></a>
  <a href="https://www.npmjs.com/package/paykitjs"><img src="https://img.shields.io/npm/dt/paykitjs?style=flat-square&color=333" alt="npm downloads"></a>
</p>

---

## What is PayKit?

PayKit is an embedded Stripe billing framework for TypeScript apps. It runs inside your app, uses your database, and gives you a typed API for products, subscriptions, entitlements, and usage billing without stitching together raw Stripe APIs and webhooks.

```ts
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

```bash
npx paykitjs init
```

Or follow the [installation guide](https://paykit.sh/docs/get-started/installation).

### 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 a free and open-source project licensed under the [MIT License](./LICENSE).

You can help continue its development by:

- [Suggest new features and report issues](https://github.com/getpaykit/paykit/issues)

## Security

If you discover a security vulnerability within PayKit, please send an email to [security@paykit.sh](mailto:security@paykit.sh).

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

## Sponsors

PayKit is supported by companies and individuals who help keep the project maintained. Want to support PayKit? [Become a sponsor →](https://github.com/sponsors/maxktz)

<!-- Pulled automatically from GitHub Sponsors via shieldcn.dev. Logos, names, and avatars are fetched live. -->
<p align="center">
  <a href="https://github.com/sponsors/maxktz">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/sponsors/maxktz.svg?title=false&mode=dark&preset=surface" />
      <source media="(prefers-color-scheme: light)" srcset="https://shieldcn.dev/sponsors/maxktz.svg?title=false&mode=light&preset=surface" />
      <img alt="PayKit sponsors" src="https://shieldcn.dev/sponsors/maxktz.svg?title=false&mode=light&preset=surface" width="820" />
    </picture>
  </a>
</p>
↑