Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@lemonsqueezy/lemonsqueezy.js
Advanced tools
This is the official JavaScript SDK for Lemon Squeezy, making it easy to incorporate billing into your JavaScript application.
# bun
bun install @lemonsqueezy/lemonsqueezy.js
# pnpm
pnpm install @lemonsqueezy/lemonsqueezy.js
# npm
npm install @lemonsqueezy/lemonsqueezy.js
Create a new API key from Settings > API in your Lemon Squeezy dashboard.
Add this API key into your project, for example as LEMONSQUEEZY_API_KEY
in your .env
file.
[!CAUTION]
Do not use this package directly in the browser, as this will expose your API key. This would give anyone full API access to your Lemon Squeezy account and store(s). For more information see here.
You can build and test a full API integration with Lemon Squeezy using Test Mode.
Any API keys created in test mode will interact with your test mode store data.
When you are ready to go live with your integration, make sure to create an API key in live mode and use that in your production application.
import {
getAuthenticatedUser,
lemonSqueezySetup,
} from "@lemonsqueezy/lemonsqueezy.js";
const apiKey = import.meta.env.LEMON_SQUEEZY_API_KEY;
lemonSqueezySetup({
apiKey,
onError: (error) => console.error("Error!", error),
});
const { data, error } = await getAuthenticatedUser();
if (error) {
console.log(error.message);
} else {
console.log(data);
}
For more functions usage, see Wiki.
Export | min+brotli |
---|---|
createDiscount | 1.01 kB |
createCheckout | 888 B |
updateSubscriptionItem | 856 B |
updateSubscription | 838 B |
listCheckouts | 824 B |
listDiscountRedemptions | 819 B |
listLicenseKeyInstances | 818 B |
listSubscriptionInvoices | 816 B |
listLicenseKeys | 815 B |
listOrderItems | 815 B |
listSubscriptionItems | 815 B |
listUsageRecords | 814 B |
listSubscriptions | 812 B |
listWebhooks | 812 B |
listCustomers | 811 B |
listDiscounts | 811 B |
listFiles | 811 B |
listOrders | 811 B |
listPrices | 811 B |
listProducts | 811 B |
listStores | 811 B |
listVariants | 811 B |
updateLicenseKey | 811 B |
createWebhook | 806 B |
issueSubscriptionInvoiceRefund | 796 B |
issueOrderRefund | 795 B |
updateWebhook | 792 B |
generateSubscriptionInvoice | 787 B |
generateOrderInvoice | 785 B |
validateLicense | 761 B |
activateLicense | 760 B |
deactivateLicense | 759 B |
createUsageRecord | 724 B |
getDiscountRedemption | 702 B |
getLicenseKeyInstance | 702 B |
getSubscriptionInvoice | 699 B |
getSubscriptionItem | 698 B |
getUsageRecord | 698 B |
getOrderItem | 697 B |
getWebhook | 697 B |
getLicenseKey | 695 B |
getCheckout | 694 B |
getStore | 694 B |
getSubscription | 694 B |
getCustomer | 692 B |
getFile | 692 B |
getOrder | 692 B |
getPrice | 692 B |
getDiscount | 691 B |
getProduct | 691 B |
archiveCustomer | 690 B |
getVariant | 690 B |
createCustomer | 686 B |
updateCustomer | 682 B |
deleteWebhook | 660 B |
cancelSubscription | 658 B |
deleteDiscount | 656 B |
getSubscriptionItemCurrentUsage | 650 B |
getAuthenticatedUser | 595 B |
lemonSqueezySetup | 106 B |
See the Contributing Guide.
FAQs
The official Lemon Squeezy JavaScript SDK.
We found that @lemonsqueezy/lemonsqueezy.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.