LemonSqueezy is a Merchant of Record — it handles VAT, sales tax, and compliance globally, so you don't have to.
Setup
PAYMENT_PROVIDER="lemonsqueezy"
LEMONSQUEEZY_API_KEY="your-api-key"
LEMONSQUEEZY_STORE_ID="your-store-id"
LEMONSQUEEZY_WEBHOOK_SECRET="your-webhook-secret"
Get your credentials from the LemonSqueezy Dashboard.
Differences from Stripe
| Feature | Stripe | LemonSqueezy |
|---|---|---|
| Tax handling | You handle (or use Stripe Tax) | Automatic (MoR) |
| Multi-line checkout | Yes (base plan + add-ons) | Single product per checkout |
| Customer portal | Stripe-hosted portal | LemonSqueezy-hosted portal |
| Connect / marketplace | Yes (Stripe Connect) | Not supported |
| Webhook events | Stripe event names | LemonSqueezy event names |
Codapult's adapter normalizes both providers behind the same interface, so your application code stays the same.
Webhook Setup
The LemonSqueezy webhook endpoint is POST /api/webhooks/lemonsqueezy.
- Go to LemonSqueezy → Settings → Webhooks
- Add endpoint:
https://your-app.com/api/webhooks/lemonsqueezy - Set the signing secret
- Select subscription and order events
Product Configuration
Create your products and variants in the LemonSqueezy dashboard, then map them to plan IDs in src/lib/payments/plans.ts. The adapter uses the LemonSqueezy variant ID to match plans during checkout and webhook processing.
Environment Variables
| Variable | Required | Description |
|---|---|---|
LEMONSQUEEZY_API_KEY | Yes | LemonSqueezy API key |
LEMONSQUEEZY_STORE_ID | Yes | Your LemonSqueezy store ID |
LEMONSQUEEZY_WEBHOOK_SECRET | Yes | Webhook signing secret |
For the full LemonSqueezy documentation, see docs.lemonsqueezy.com.