Skip to content

A unified library to use multiple payment gateways in one place

License

Notifications You must be signed in to change notification settings

SupersaasHQ/usePayment

Repository files navigation

SupersaasHQ/usePayment

npm version npm downloads

A package to handle payments using Stripe or Lemonsqueezy using a single interface.

Why do we need this?

I run supersaas.dev, a fullstack saas template that allows you to create your own saas. I wanted to make it easy for people to add payments to their saas without having to deal with the nuances of each payment provider.

You get a single interface to handle payments, subscriptions, managing billing etc.

usePayment("stripe").createCheckoutLink(options);
usePayment("lemonsqueezy").createCheckoutLink(options);

Supported Providers

  • Stripe
  • Lemonsqueezy
  • Paddle (WIP)
  • Paypal (WIP)
  • Creem (WIP)
  • Polar.sh (WIP)

Usage

Install package:

# ✨ Auto-detect
npx nypm install use-payment

# npm
npm install use-payment

# yarn
yarn add use-payment

# pnpm
pnpm install use-payment

# bun
bun install use-payment

# deno
deno install use-payment

Import:

ESM (Node.js, Bun, Deno)

import {} from "use-payment";

CommonJS (Legacy Node.js)

const {} = require("use-payment");

CDN (Deno, Bun and Browsers)

import {} from "https://esm.sh/use-payment";

Development

local development
  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Published under the MIT license. Made by community 💛


🤖 auto updated with automd

About

A unified library to use multiple payment gateways in one place

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published