npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lumra/module-stripe-connect

v0.1.1

Published

Lumra Stripe Connect payment provider implementation

Readme

@lumra/module-stripe-connect

Stripe Connect payment provider for Lumra. Supports direct charges, destination charges (creator payouts), and platform fees. Verifies Stripe webhooks automatically.

Install

npm install @lumra/module-stripe-connect @lumra/payments

Setup

import { registerProvider } from '@lumra/payments'
import { createStripeConnectProvider } from '@lumra/module-stripe-connect'

registerProvider(createStripeConnectProvider({
  secretKey:     process.env.STRIPE_SECRET_KEY!,
  webhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
}))

Create a checkout session

import { getProvider } from '@lumra/payments'

const session = await getProvider('stripe').createCheckoutSession({
  resourceId: 'video-123',
  userId:     'user-456',
  amount:     999,          // cents — always look this up from your DB
  currency:   'usd',
  successUrl: 'https://yourapp.com/watch/video-123?success=1',
  cancelUrl:  'https://yourapp.com/watch/video-123',

  // For creator marketplace (Stripe Connect):
  creatorAccountId: 'acct_1ExampleStripeID',   // creator's connected Stripe account
  platformFee:      200,    // cents — platform keeps this, rest goes to creator
})

// Redirect the user to session.url

Handle Stripe webhook

Always use the raw request body — do not let your framework parse it as JSON first.

// Express
app.post('/api/webhook', express.raw({ type: 'application/json' }), async (req, res) => {
  const sig = req.headers['stripe-signature'] as string
  const event = await getProvider('stripe').handleWebhook(req.body as Buffer, sig)
  // event.type, event.resourceId, event.userId
  res.json({ received: true })
})

// Fastify
app.addContentTypeParser('application/json', { parseAs: 'buffer' }, (_, body, done) => done(null, body))
app.post('/api/webhook', async (req, reply) => {
  const event = await getProvider('stripe').handleWebhook(req.body as Buffer, req.headers['stripe-signature'] as string)
  reply.send({ received: true })
})

Stripe Dashboard setup

  1. Go to dashboard.stripe.com/test/apikeys → copy your Secret key
  2. Go to dashboard.stripe.com/test/webhooks → add endpoint → select checkout.session.completed
  3. Copy the Signing secret → set as STRIPE_WEBHOOK_SECRET

Local testing:

stripe listen --forward-to localhost:3001/api/webhook/stripe

Test cards

| Card number | Result | |---|---| | 4242 4242 4242 4242 | Payment succeeds | | 4000 0000 0000 9995 | Payment declined | | 4000 0025 0000 3155 | Requires 3D Secure |

Use any future expiry date and any 3-digit CVV.


© 2026 Reel Foundry AU. All rights reserved.
MIT License — see LICENSE