# Lemon Squeezy

This guide provides a comprehensive overview of integrating **Lemon Squeezy** into your **SSK-Pro** project. With Lemon Squeezy, you can seamlessly manage payments, handle affiliate marketing, and securely track order events.

***

## **Overview**

The Lemon Squeezy integration in **SSK-Pro** includes:

* **Payment Processing**: Receive and process payments with Lemon Squeezy.
* **Affiliate Marketing**: Support for Lemon Squeezy's built-in affiliate marketing, allowing you to incentivize referrals.
* **Webhook Handling**: Automatically receive events like `order_created` and securely store relevant data in your database.
* **Feature Flag Flexibility**: Use environment-controlled feature flags to toggle Lemon Squeezy and other payment providers (e.g., Stripe).

***

## **Prerequisites**

Before starting, make sure you have the following:

* **LEMONSQUEEZY\_WEBHOOK\_SECRET** environment variable (up to 40 characters). This secret is crucial for verifying the authenticity of incoming Lemon Squeezy events.
* **Environment Feature Flags**:
  * `FF_LEMON="true"` to enable Lemon Squeezy.
  * `FF_LEMON_SQUEEZY_AFFILIATES="true"` to enable Lemon Squeezy affiliate marketing.
  * Ensure `FF_STRIPE="false"` if using Lemon Squeezy to avoid conflicts with Stripe.

***

## **Getting Started**

Follow these chapters to configure and integrate Lemon Squeezy into your **SSK-Pro** project:

For further details on Lemon Squeezy’s webhook specifications, refer to their [official documentation](https://docs.lemonsqueezy.com/). This guide ensures that your integration is secure, flexible, and fully aligned with **SSK-Pro**'s feature flag system, giving you control over your payment provider setup.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.startupstarterkits.com/ssk-pro-features/payments/index-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
