Own your payments

Open-source payment orchestration for TypeScript

README

PayKit is a payments orchestration framework for TypeScript. It sits between your app and payment providers like Stripe or PayPal, giving you a unified API. Webhooks are verified and normalized automatically. Your database owns the subscriptions, invoices, and usage records — no provider lock-in.

Configuration
import { createPayKit } from "paykitjs"import { stripe } from "@paykitjs/stripe"import { drizzleAdapter } from "paykitjs/adapters/drizzle"export const paykit = createPayKit({  database: drizzleAdapter(db),  providers: [    stripe({      secretKey: env.STRIPE_SECRET_KEY,      webhookSecret: env.STRIPE_WEBHOOK_SECRET,    }),  ],  on: {    "subscription.activated": async ({ subscription, customer }) => {      await sendEmail(customer.email, "Welcome to Pro!")    },    "payment.succeeded": async ({ payment }) => {      console.log("Payment received", payment)    },  },})
Supported Providers
Features
Unified API

One API for checkout, subscriptions, invoices, and events — regardless of which payment provider you use.

const checkout = await paykit.api.createCheckout({  customerId: "user_123",  amount: 9900, // $99.00  description: "Lifetime License",  successURL: "https://myapp.com/success",  cancelURL: "https://myapp.com/cancel",  attachMethod: true,});// redirect user to checkout.url

Own your payments with confidence in minutes.

© 2026 PayKit
|