Take payments with Lemon Squeezy
This guide explains how to let users pay for your Casdoor products with Lemon Squeezy, which handles payments, subscriptions, and tax for software and digital products.
Learning outcomes
- Get an API key and the store ID from Lemon Squeezy.
- Add Lemon Squeezy as a payment provider and add it to a product.
What you need
- A Lemon Squeezy account with a store and a product
- A product in Casdoor
Get the credentials
- In the Lemon Squeezy dashboard, go to Settings > API and create an API key.
- In the settings of your store, note the store ID.
Add the provider in Casdoor
-
In the Casdoor admin console, go to Identity > Providers and add a provider.
-
Set Category to
Paymentand Type toLemon Squeezy. -
Fill in the fields:
Casdoor Lemon Squeezy ID client Store ID Client secret API Key -
Save the provider.
Add the provider to a product
- Set the name of the Casdoor product to the variant ID of the product in Lemon Squeezy.
- Add the provider to the Payment providers of the product and save it.
At checkout, users go to Lemon Squeezy.
conseil
Configure webhooks in the Lemon Squeezy dashboard, so that Casdoor learns the payment status reliably. Without webhooks, Casdoor infers the status from the expiry of the checkout.