open-index/open-npm huggingface dataset:
npm package: @plutaslab/stripe-kit
Description: The complete Stripe integration toolkit - Core SDK
Author: Plutas Labs
Latest version: 0.1.1

# @plutaslab/stripe-kit

The complete Stripe integration toolkit for modern applications.

## Installation

```bash
npm install @plutaslab/stripe-kit stripe
# or
pnpm add @plutaslab/stripe-kit stripe
# or
yarn add @plutaslab/stripe-kit stripe
```

## Quick Start

```typescript
import { StripeKit } from '@plutaslab/stripe-kit'

const stripe = new StripeKit({
  secretKey: process.env.STRIPE_SECRET_KEY!,
  webhookSecret: process.env.STRIPE_WEBHOOK_SECRET,
})

// Create a customer
const customer = await stripe.customers.create({
  email: 'user@example.com',
  name: 'John Doe',
})

// Create a checkout session
const session = await stripe.checkout.createSession({
  items: [{ priceId: 'price_xxx' }],
  successUrl: '/success',
  cancelUrl: '/cancel',
})

// Handle webhooks
const handler = stripe.webhooks.handler({
  'checkout.session.completed': async (event) => {
    console.log('Payment completed!', event.data.object)
  },
  'customer.subscription.created': async (event) => {
    console.log('New subscription!', event.data.object)
  },
})
```

## Features

- **Type-safe** - Full TypeScript support with typed webhook events
- **Simple API** - Intuitive methods that hide Stripe complexity
- **Subscriptions** - Create, update, pause, resume, cancel
- **Checkout** - Sessions, Payment Intents, Payment Links
- **Webhooks** - Type-safe handlers with automatic verification
- **Customers** - Full CRUD with search
- **Usage Billing** - Meters and usage records
- **Connect** - Marketplace payments and payouts
- **Invoicing** - Create, send, finalize invoices
- **Portal** - Customer billing portal

## Documentation

See the [full documentation](https://github.com/plutaslab/stripe-kit#readme).

## License

MIT
npm package: @plutaslab/stripe-kit-express
Description: Express middleware for Stripe Kit
Author: Plutas Labs
Latest version: 0.1.1

# @plutaslab/stripe-kit-express

Express middleware for Stripe Kit - seamless Stripe integration for Express applications.

## Installation

```bash
npm install @plutaslab/stripe-kit-express @plutaslab/stripe-kit stripe
```

## Quick Start

```typescript
import express from 'express'
import { StripeKit } from '@plutaslab/stripe-kit'
import { createWebhookMiddleware, rawBodyMiddleware } from '@plutaslab/stripe-kit-express'

const app = express()
const stripe = new StripeKit({
  secretKey: process.env.STRIPE_SECRET_KEY!,
  webhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
})

// Use raw body middleware for webhooks
app.post(
  '/webhooks/stripe',
  rawBodyMiddleware(),
  createWebhookMiddleware(stripe, {
    'checkout.session.completed': async (event) => {
      console.log('Checkout completed!', event.data.object)
    },
  })
)

// Use JSON for other routes
app.use(express.json())

app.listen(3000)
```

## Features

- Webhook middleware with automatic signature verification
- Raw body middleware for webhook routes
- Pre-built routes for checkout and portal

## License

MIT
npm package: @plutaslab/stripe-kit-next
Description: Next.js adapter for Stripe Kit
Author: Plutas Labs
Latest version: 0.1.1

# @plutaslab/stripe-kit-next

Next.js adapter for Stripe Kit - seamless Stripe integration for Next.js applications.

## Installation

```bash
npm install @plutaslab/stripe-kit-next @plutaslab/stripe-kit stripe
```

## Quick Start

### App Router

```typescript
// app/api/webhooks/stripe/route.ts
import { createWebhookHandler } from '@plutaslab/stripe-kit-next/app'
import { stripe } from '@/lib/stripe'

export const POST = createWebhookHandler(stripe, {
  'checkout.session.completed': async (event) => {
    // Handle successful checkout
  },
})
```

### Pages Router

```typescript
// pages/api/webhooks/stripe.ts
import { createWebhookHandler } from '@plutaslab/stripe-kit-next/pages'
import { stripe } from '@/lib/stripe'

export default createWebhookHandler(stripe, {
  'checkout.session.completed': async (event) => {
    // Handle successful checkout
  },
})

export const config = {
  api: { bodyParser: false },
}
```

## Features

- App Router webhook handlers
- Pages Router webhook handlers
- Server Actions for checkout and portal
- Middleware for subscription guards

## License

MIT
npm package: @plutaslab/stripe-kit-types
Description: TypeScript types for Stripe Kit
Author: Plutas Labs
Latest version: 0.1.0

# @plutaslab/stripe-kit-types

TypeScript type definitions for Stripe Kit.

## Installation

```bash
npm install @plutaslab/stripe-kit-types
# or
pnpm add @plutaslab/stripe-kit-types
# or
yarn add @plutaslab/stripe-kit-types
```

## Usage

```typescript
import type {
  StripeKitConfig,
  CreateCustomerInput,
  CheckoutSessionOptions,
  WebhookHandlers,
} from '@plutaslab/stripe-kit-types'
```

## License

MIT