lemonsqueezy.ts
lemonsqueezy.ts copied to clipboard
๐ JavaScript / TypeScript SDK for the Lemon Squeezy API
๐ 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