Skip to content

UntitledApps/Lemon_Squeezy_Dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An unofficial Lemon Squeezy API implementation for Flutter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages