Lemon Squeezy is a payment platform built for selling digital products — software, ebooks, courses, and more. Connecting it to HTMLPub lets you add checkout buttons that send customers straight to Lemon Squeezy's hosted checkout.
What you'll need
- An HTMLPub account (free or paid)
- A Lemon Squeezy account with at least one store
- Two things from Lemon Squeezy: your API key and Store ID
Step 1: Generate an API key
- Log in to app.lemonsqueezy.com
- Go to Settings → API (direct link)
- Click Generate a new key
- Give it a name (e.g. "HTMLPub") and copy the key
Save this key somewhere safe — Lemon Squeezy only shows it once.
Step 2: Find your Store ID
- Go to Settings → Stores in your Lemon Squeezy dashboard
- Click on your store
- Look at the URL — the number at the end is your Store ID (e.g.
https://app.lemonsqueezy.com/settings/stores/12345→ Store ID is12345)
Step 3: Connect in HTMLPub
- Open any page in the HTMLPub editor
- Click the Checkout button in the toolbar
- Select the Lemon Squeezy tab
- Paste your API key and Store ID
- Click Test & Connect
If the credentials are valid, you'll see a green "Connected" badge with your store name.
Step 4: Find your Variant ID
Lemon Squeezy uses Variant IDs for checkout — not Product IDs. Every product has at least one variant (even single-option products).
- Go to Products in your Lemon Squeezy dashboard
- Click on a product
- Go to the Variants tab
- Copy the variant ID (the number shown next to each variant)
If your product only has one variant, that's the one you need.
Step 5: Add a checkout button
Back in HTMLPub:
- Enter the Variant ID and a product name
- Set the price and currency
- Click Add checkout button with AI
When a visitor clicks the button, they'll be taken to Lemon Squeezy's checkout page for that variant.
Troubleshooting
"Invalid credentials" error? Make sure you're using the full API key (starts with eyJ0eXAi...) and the numeric Store ID, not the store name.
Can't find your Variant ID? Go to the product in your dashboard, click into the Variants tab. Every product has at least one variant — even if you didn't create multiple options.