Skip to main content

Lemon Squeezy

Configurationโ€‹

SaaSykit comes with support for Lemon Squeezy out of the box. This allows you to start accepting payments from your customers right away.

First, you will need to create a Lemon Squeezy account. Once you have created your account, you will need to get your credentials from Lemon Squeezy.

In the Admin Panel and under "Settings" click on "Payment Providers". You will be redirected to the payment providers settings page.

Payment providers

Click on "Lemon Squeezy" and using the toggle "is active" you can enable/disable the payment provider. (Don't forget to click "Save" after you make any changes).

Once you enable Lemon Squeezy, you will need to configure the credentials for it. To do that, click on the payment provider you want to configure, then click on "Edit credentials". You will be redirected to the payment provider credentials page.

Credentials

You will need to copy some values from your Lemon Squeezy account to your application to be able to connect it. To do that please follow the following steps:

To integrate Lemon Squeezy with your application, you need to do the following steps:

  1. Login to Lemon Squeezy Dashboard

  2. On the left menu, click on "Settings" > "API". Click on the "+" sign on the right to create a new API key. Give the API key a name and click "Create API Key". Copy the generated key into the form in the field called "API key".

  3. On the same page, on the left menu, click on "Settings" > "Stores". Copy the store id ("#xxxxx") without the # into the "Store ID" field.

  4. On the same page, on the left menu, click on "Settings" > "Webhooks". Click on "+" to create a new webhook and enter the URL below.

    https://yourwebsite.com/api/payments-providers/lemon-squeezy/webhook

    Replace "yourwebsite.com" with your actual domain name.

  5. Generate a new webhook signing secret and copy it into the form in the field called "Signing Secret" and also into the "Signing secret" field in the Lemon Squeezy Webhook creation form.

  6. You can use LastPass to generate a secure webhook signing secret.

    • order_created
    • order_refunded
    • subscription_created
    • subscription_updated
    • subscription_cancelled
    • subscription_resumed
    • subscription_expired
    • subscription_paused
    • subscription_unpaused
    • subscription_payment_failed
    • subscription_payment_success
    • subscription_payment_recovered
    • subscription_payment_refunded
    • subscription_plan_changed

Click on "Save Webhook" and copy the generated webhook signing secret and enter it into the field in the form.

tip

All the above steps are also available to you inside your admin panel on the right hand side of the credentials page as shown in the image above.

Configuring Lemon Squeezy Plans & Productsโ€‹

Unfortunately, Lemon Squeezy doesn't offer an API that SaaSykit can use to automatically generate plans products for you just like it's the case with Stripe & Paddle. This means that you will need to manually create the plans and products in Lemon Squeezy and link them to your application.

First, create your subscription plans & products or your one-time products in the admin panel and setup their prices.

Once you are done with that, it's time to create your plans and products in Lemon Squeezy.

To do that, login to your Lemon Squeezy account and on the left menu, click on "Store" > "Products". Click on the "+ New Product" button on the right to create a new product.

New product button

If you are creating a subscription plan, you might need to create multiple variants to the same product. For example: if you have a "Pro" plan that is billed monthly and annually, you will need to create two variants for the same "Pro" product.

If you are creating a one-time purchase product, you will only need to create one product and that's it because each product will have one default variant if no other variants are created.

Add product

Fill in the form with the details of your product and click "Publish Product".

We are interested in the "Variant ID" of the product variants you have created.

To get the "Variant ID":

If your product has multiple variants: Click on the product you have created and under "Variants", you will see the variants listed. Click on the "three dots" on the right of the variant you are interested in and click on "Copy ID".

Copy variant ID

If your product has only one variant: click on the "three dots" on the right of the product and click on "Copy Variant ID".

Copy variant ID

This "Variant ID" that you copied will have to be set in the admin panel in the product you have created.

Linking Lemon Squeezy Plans & Products to SaaSykitโ€‹

For Subscription products, on SaaSykit admin panel, under "Product Management", click on "Plans". Click on the plan you want to link to Lemon Squeezy's variant, scroll down and click on the "Payment Provider Data" tab.

Payment provider data

Click on the "New Payment Provider Data" button.

Add payment provider data

Set the "Payment Provider" to "Lemon Squeezy" and the "Payment Provider Product/Variant ID" to the "Variant ID" you copied from Lemon Squeezy

There is a button "Validate Product (Lemon Squeezy)" which you can click on to validate the product you have created in Lemon Squeezy with the product you have created in SaaSykit. This will give you a warning if any of the details that you have entered are not matching with the details in Lemon Squeezy.

Now click "Create" and you are done.

Linking Lemon Squeezy One-time Purchase Products to SaaSykitโ€‹

For One-time purchase products, on SaaSykit admin panel, under "Product Management", click on "One-time Purchase Products".

Click on the product you want to link to Lemon Squeezy's variant, scroll down and click on the "Payment Provider Data" tab.

Payment provider data

Click on the "New Payment Provider Data" button.

Add payment provider data

Set the "Payment Provider" to "Lemon Squeezy" and the "Payment Provider Product/Variant ID" to the "Variant ID" you copied from Lemon Squeezy.

There is a button "Validate Product (Lemon Squeezy)" which you can click on to validate the product you have created in Lemon Squeezy with the product you have created in SaaSykit. This will give you a warning if any of the details that you have entered are not matching with the details in Lemon Squeezy.

Now click "Create" and you are done.

Taxesโ€‹

If you would like to calculate taxes for your products, you can configure that in your Lemon Squeezy account settings.

One the left menu, click on "Settings" > "General". The option "Tax-inclusive pricing" allows you to choose whether the prices you set for your products include taxes or not.