メインコンテンツにスキップ

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​

  1. In the Lemon Squeezy dashboard, go to Settings > API and create an API key.
  2. In the settings of your store, note the store ID.

Add the provider in Casdoor​

  1. In the Casdoor admin console, go to Identity > Providers and add a provider.

  2. Set Category to Payment and Type to Lemon Squeezy.

  3. Fill in the fields:

    CasdoorLemon Squeezy
    クライアントIDStore ID
    クライアントシークレットAPI Key
  4. Save the provider.

Add the provider to a product​

  1. Set the name of the Casdoor product to the variant ID of the product in Lemon Squeezy.
  2. Add the provider to the Payment providers of the product and save it.

At checkout, users go to Lemon Squeezy.

ヒント

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.

See also​