lemonsqueezy.ts icon indicating copy to clipboard operation
lemonsqueezy.ts copied to clipboard

๐Ÿ‹ JavaScript / TypeScript SDK for the Lemon Squeezy API



๐Ÿ‹
lemonsqueezy.ts




JavaScript / TypeScript SDK for the Lemon Squeezy API

Build status Package version Package monthly downloads Docs



๐Ÿš€ Install

Install it locally in your project

# npm
npm install lemonsqueezy.ts

# yarn
yarn add lemonsqueezy.ts

# pnpm
pnpm install lemonsqueezy.ts

๐Ÿฆ„ Usage

Create a new client instance with your API key

import { LemonsqueezyClient } from "lemonsqueezy.ts";

const client = new LemonsqueezyClient("YOUR_API_KEY");

const user = await client.getUser();
// => { attributes: { ... }, id: "1", links: { self: "..." }, type: 'users' }

const stores = await client.listAllStores();
// => [{ attributes: { ... }, id: "1", type: "stores" }]

// And many many more...

๐Ÿ“š Documentation

To view the documentation on how to use each module, view the README.md for each module:

  • ๐Ÿ›’ Checkout
  • ๐Ÿ”– Discount
  • ๐Ÿ“„ File
  • ๐Ÿ”‘ License key
  • ๐Ÿฅ‡ License key instance
  • ๐Ÿงพ Order
  • ๐Ÿ“ฆ Order Item
  • ๐Ÿ’Ž Product
  • ๐Ÿช Store
  • โ™ป๏ธ Subscription
  • ๐Ÿง˜ User
  • ๐ŸงŸ Variant