Stores

Everything in Lemon Squeezy belongs to a store. Each store can have multiple products, orders, discounts etc. and is billed separately. You can create a new store via the Lemon Squeezy Dashboard.

A store can have many Products, Orders, Subscriptions, Discounts and License Keys.

The store object

Attributes

name

The name of the store.

slug

The slug used to identify the store.

domain

The domain of the store in the format {slug}.lemonsqueezy.com.

url

The fully-qualified URL for the store (e.g. https://{slug}.lemonsqueezy.com).

avatar_url

The URL for the store avatar.

plan

The current billing plan for the store (e.g. fresh, sweet).

country

The ISO 3166-1 two-letter country code for the store (e.g. US, GB, etc).

country_nicename

The full country name for the store (e.g. United States, United Kingdom, etc).

currency

The ISO 4217 currency code for the store (e.g. USD, GBP, etc).

total_sales

A count of the all-time total sales made by this store.

total_revenue

A positive integer in cents representing the total all-time revenue of the store in USD.

thirty_day_sales

A count of the sales made by this store in the last 30 days.

thirty_day_revenue

A positive integer in cents representing the total revenue of the store in USD in the last 30 days.

created_at

An ISO-8601 formatted date-time string indicating when the object was created.

updated_at

An ISO-8601 formatted date-time string indicating when the object was last updated.

Store object

{
    "type": "stores",
    "id": "1",
    "attributes": {
      "name": "My Store",
      "slug": "my-store",
      "domain": "my-store.lemonsqueezy.com",
      "url": "https:\/\/demo-store.lemonsqueezy.com",
      "avatar_url": "https:\/\/app.lemonsqueezy.com\/storage\/avatars\/stores\/1\/czTkMkDm4Vfb8PZehb5c29XFCm9JZyJx0AjEZP7s.png",
      "plan": "fresh",
      "country": "US",
      "country_nicename": "United States",
      "currency": "USD",
      "total_sales": 1,
      "total_revenue": 999,
      "thirty_day_sales": 0,
      "thirty_day_revenue": 0,
      "created_at": "2021-05-24T14:15:06.000000Z",
      "updated_at": "2021-06-15T10:03:14.000000Z"
    }
}

Retrieve a store

Retrieves the store with the given ID.

Returns

Returns a store object.

GET /v1/stores/:id

curl "https://api.lemonsqueezy.com/v1/stores/1" \
     -H 'Accept: application/vnd.api+json' \
     -H 'Content-Type: application/vnd.api+json' \
     -H 'Authorization: Bearer {api_key}'

Response

{
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1"
  },
  "data": {
    "type": "stores",
    "id": "1",
    "attributes": {
      "name": "My Store",
      "slug": "my-store",
      "domain": "my-store.lemonsqueezy.com",
      "url": "https:\/\/my-store.lemonsqueezy.com",
      "avatar_url": "https:\/\/app.lemonsqueezy.com\/storage\/avatars\/stores\/1\/czTkMkDm4Vfb8PZehb5c29XFCm9JZyJx0AjEZP7s.png",
      "plan": "fresh",
      "country": "US",
      "country_nicename": "United States",
      "currency": "USD",
      "total_sales": 1,
      "total_revenue": 999,
      "thirty_day_sales": 0,
      "thirty_day_revenue": 0,
      "created_at": "2021-05-24T14:15:06.000000Z",
      "updated_at": "2021-06-15T10:03:14.000000Z"
    },
    "relationships": {
      "products": {
        "links": {
          "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/products",
          "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/products"
        }
      },
      "orders": {
        "links": {
          "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/orders",
          "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/orders"
        }
      },
      "subscriptions": {
        "links": {
          "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/subscriptions",
          "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/subscriptions"
        }
      },
      "discounts": {
        "links": {
          "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/discounts",
          "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/discounts"
        }
      },
      "license-keys": {
        "links": {
          "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/license-keys",
          "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/license-keys"
        }
      }
    },
    "links": {
      "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1"
    }
  }
}

List all stores

Returns a paginated list of stores.

Returns

Returns a paginated list of store objects ordered by name.

GET /v1/stores

curl "https://api.lemonsqueezy.com/v1/stores" \
     -H 'Accept: application/vnd.api+json' \
     -H 'Content-Type: application/vnd.api+json' \
     -H 'Authorization: Bearer {api_key}'

Response

{
  "meta": {
    "page": {
      "currentPage": 1,
      "from": 1,
      "lastPage": 1,
      "perPage": 10,
      "to": 10,
      "total": 10
    }
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https:\/\/api.lemonsqueezy.com\/v1\/stores?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=name",
    "last": "https:\/\/api.lemonsqueezy.com\/v1\/stores?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=name"
  },
  "data": [
    {
      "type": "stores",
      "id": "1",
      "attributes": {
        "name": "My Store",
        "slug": "my-store",
        "domain": "my-store.lemonsqueezy.com",
        "url": "https:\/\/my-store.lemonsqueezy.com",
        "avatar_url": "https:\/\/app.lemonsqueezy.com\/storage\/avatars\/stores\/1\/czTkMkDm4Vfb8PZehb5c29XFCm9JZyJx0AjEZP7s.png",
        "plan": "fresh",
        "country": "US",
        "country_nicename": "United States",
        "currency": "USD",
        "total_sales": 1,
        "total_revenue": 999,
        "thirty_day_sales": 0,
        "thirty_day_revenue": 0,
        "created_at": "2021-05-24T14:15:06.000000Z",
        "updated_at": "2021-06-15T10:03:14.000000Z"
      },
      "relationships": {
        "products": {
          "links": {
            "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/products",
            "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/products"
          }
        },
        "orders": {
          "links": {
            "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/orders",
            "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/orders"
          }
        },
        "subscriptions": {
          "links": {
            "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/subscriptions",
            "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/subscriptions"
          }
        },
        "discounts": {
          "links": {
            "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/discounts",
            "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/discounts"
          }
        },
        "license-keys": {
          "links": {
            "related": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/license-keys",
            "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1\/relationships\/license-keys"
          }
        }
      },
      "links": {
        "self": "https:\/\/api.lemonsqueezy.com\/v1\/stores\/1"
      }
    },
    {...},
    {...},
  ]
}