Skip to content

Lemon Squeezy

Integrate GoPayLocal with Lemon Squeezy for PPP discount codes.

Lemon Squeezy is a modern payment platform popular with indie developers and small SaaS businesses. GoPayLocal creates store-scoped discounts that work across your Lemon Squeezy products.

  1. Get your Lemon Squeezy API key

    Go to Lemon Squeezy Dashboard > Settings > API. Create a new API key.

  2. Connect in GoPayLocal

    Go to your GoPayLocal dashboard > Settings > Integrations > Lemon Squeezy and click Connect. Enter your API key in the dialog.

    Click Test after connecting to verify your credentials.

  3. Create a campaign

    Select Lemon Squeezy as the payment provider in your campaign settings.

GoPayLocal creates store-scoped discounts via the Lemon Squeezy API:

{
"type": "discounts",
"attributes": {
"name": "PPP India 30%",
"code": "PPP-INDIA-30",
"amount_type": "percent",
"amount": 30,
"is_limited_to_products": false
}
}

Discounts are store-wide by default, meaning they work on any product in your Lemon Squeezy store.

Lemon Squeezy supports auto-applying discounts via the checkout URL parameter:

https://yourstore.lemonsqueezy.com/checkout/buy/xxx?checkout[discount_code]=PPP-INDIA-30

To auto-apply, redirect visitors to the checkout URL with the discount code appended. GoPayLocal can generate these URLs automatically when auto-apply is enabled.

You can also use the JavaScript overlay:

LemonSqueezy.Url.Open(
'https://yourstore.lemonsqueezy.com/checkout/buy/xxx?checkout[discount_code]=PPP-INDIA-30'
);

Lemon Squeezy does not have a dedicated sandbox environment. For testing:

  • Create a test product with a low price ($1)
  • Use real payment methods (or Lemon Squeezy’s built-in test mode if available)
  • Delete test discounts after testing

Webhook handling for Lemon Squeezy is planned. Currently, discount code creation and checkout integration work fully. Redemption tracking via webhooks is on the roadmap.

  • Discounts are store-scoped (apply to all products) unless you explicitly restrict them
  • No true sandbox environment
  • Limited discount customization compared to Stripe
  • Cannot combine multiple discount codes at checkout