@kevinrobertandrews/lightpay
v0.1.4
Published
Reusable Stripe payment flows for modern web apps.
Maintainers
Readme
@kevinrobertandrews/lightpay
Reusable Stripe payment flows for modern web apps.
One function call. One session. Zero boilerplate.
✨ Features
- ✅ Framework-agnostic
- 🔐 Secure Stripe abstraction
- 🧠 Type-safe configuration
- ⚡ Easy checkout session creation
- 🧩 Ideal for monorepos or modular APIs
🚀 Getting Started
1. Install
pnpm add @kevinrobertandrews/lightpay
# or
npm install @kevinrobertandrews/lightpay2. Configure Lightpay
import { configureLightpay } from "@kevinrobertandrews/lightpay";
const lightpay = configureLightpay({
stripeSecretKey: process.env.STRIPE_SECRET_KEY!,
successUrl: "https://yourapp.com/success",
cancelUrl: "https://yourapp.com/cancel",
});3. Create a Checkout Session
const session = await lightpay.createCheckoutSession({
priceId: "price_123",
customerEmail: "[email protected]",
});
return session.url;