Lemon Squeezy offers Payments, tax & subscriptions for software companies and acts as a Merchant of Record.
Repo Owner: CarlosDev33 feel free to contribute here: Github Repo
As there was no Dart package for Lemon Squeezy for Flutter Developers, I decided to make my own. It is used in several production Flutter web apps, for example, my apps Is It Estrogenic? and Markie.
This package covers all REST API endpoints found at https://docs.lemonsqueezy.com/api and is using the DIO package to send HTTPS Requests.
The package sends an HTTPS Request to the specified Endpoint and returns a JSON Response.
- First, you need a Lemon Squeezy Account and a valid API Key. Get your Key at https://app.lemonsqueezy.com/settings/api
- Set the
apiKey
variable to your Key. Consider using Env variables for more safety. - Call any endpoint found at https://docs.lemonsqueezy.com/api/ by typing
LemonSqueezy().The-End-Point-Name
- To use the result put a
.then((value) {})
at the end like shown in the example down below:
LemonSqueezy()
.createDiscount(
name: "10% Off",
code: "10PERCENT",
amount: 10,
amountType: "percent",
duration: "once",
storeId: YOUR-STORE-ID,
maxRedemptions: 1)
.then((value) {
print(value);
})
Contributions are highly appreciated! Here is the Repo: UntitledApps/Lemon_Squeezy_Dart