lemon_squeezy 1.0.3 copy "lemon_squeezy: ^1.0.3" to clipboard
lemon_squeezy: ^1.0.3 copied to clipboard

A unofficial Lemon Squeezy API Implemenation for Flutter. Lemon Squezzy offers Payments, tax & subscriptions for software companies and acts as a Merchant of Record.

An Unofficial Lemon Squeezy API Implementation for Flutter #

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

Motivation #

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.

What Does it Cover? #

This package covers all REST API endpoints found at https://docs.lemonsqueezy.com/api and is using the DIO package to send HTTPS Requests.

How Does it Work? #

The package sends an HTTPS Request to the specified Endpoint and returns a JSON Response.

How to Use: #

  1. First, you need a Lemon Squeezy Account and a valid API Key. Get your Key at https://app.lemonsqueezy.com/settings/api
  2. Set the apiKey variable to your Key. Consider using Env variables for more safety.
  3. Call any endpoint found at https://docs.lemonsqueezy.com/api/ by typing LemonSqueezy().The-End-Point-Name
  4. 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);
})

Contribute #

Contributions are highly appreciated! Here is the Repo: UntitledApps/Lemon_Squeezy_Dart

7
likes
130
points
49
downloads

Publisher

verified publisheruntitledapps.net

Weekly Downloads

A unofficial Lemon Squeezy API Implemenation for Flutter. Lemon Squezzy offers Payments, tax & subscriptions for software companies and acts as a Merchant of Record.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dio

More

Packages that depend on lemon_squeezy