Test Lemon Squeezy webhooks
Lemon Squeezy sends webhooks for orders, subscriptions, and license key events in your store. Capture them on a free webhooks.cc endpoint to see exactly what Lemon Squeezy sends, or fire realistic, correctly signed sample payloads at your own handler without touching a production account.
No credit card · 50 requests/day free · or get a guest URL without an account
Prefer a walkthrough? Read the local webhook testing guide.
Lemon Squeezy test cards
Use these in test mode with any future expiry date (such as 12/35), any three-digit CVC and any value in the other fields. Each test purchase fires the same webhooks a live one does.
| Card | Number |
|---|---|
| Visa (succeeds) | 4242 4242 4242 4242 |
| Mastercard (succeeds) | 5555 5555 5555 4444 |
| American Express (succeeds) | 3782 822463 10005 |
| Insufficient funds (declined) | 4000 0000 0000 9995 |
| Expired card (declined) | 4000 0000 0000 0069 |
| 3D Secure authentication | 4000 0027 6000 3184 |
Source: Lemon Squeezy test mode docs.
How to test Lemon Squeezy webhooks
- 1
Create a webhook endpoint
Sign in free with GitHub, Google, or email to create a persistent endpoint, or grab an instant guest URL at webhooks.cc without an account.
- 2
Point Lemon Squeezy at your URL
Paste the endpoint URL into Lemon Squeezy: Lemon Squeezy → Settings → Webhooks.
- 3
Inspect what arrives
Each delivery appears live in the dashboard with method, headers, body, query parameters, and source IP.
- 4
Forward to localhost or assert in CI
Run whk tunnel <port> to forward webhooks to a local server, or use the TypeScript, Python or Go SDK to wait for and assert on deliveries in tests.
Lemon Squeezy webhook signature
| Signature header | x-signature |
|---|---|
| Algorithm | HMAC-SHA256 |
| Verification in webhooks.cc | Supported: add your signing secret and every request is checked automatically |
Checking one request by hand? Paste its body and headers into the webhook signature checker, which has the Lemon Squeezy scheme built in and runs in your browser.
New to signature verification? Read the webhook signature verification guide.
Send sample Lemon Squeezy events
These Lemon Squeezy templates ship with realistic payloads and valid signature headers. Send them from the dashboard's Send button, the SDK, or your AI agent via MCP.
order_createdsubscription_createdsubscription_payment_success# Send a signed Lemon Squeezy sample with the SDK
await client.endpoints.sendTemplate( slug, {
provider: "lemonsqueezy",
template: "order_created",
secret: "your-test-secret",
});Test your Lemon Squeezy webhook handler in CI
sendTo signs each request the way Lemon Squeezy does, with your test secret from LEMONSQUEEZY_WEBHOOK_SECRET, and posts it straight to your handler, so its signature check stays on. The second test proves the handler rejects a forged signature. Drop the file into a Vitest suite that runs against your app; for Jest, delete the first line, since Jest provides the same globals.
import { describe, expect, it } from "vitest";
import { WebhooksCC } from "@webhooks-cc/sdk";
// Runs against your app on localhost. WHK_API_KEY and LEMONSQUEEZY_WEBHOOK_SECRET come from the env.
const client = new WebhooksCC({ apiKey: process.env.WHK_API_KEY! });
const url = "http://localhost:3000/api/webhooks/lemonsqueezy";
const send = (secret: string) =>
client.sendTo(url, {
provider: "lemonsqueezy",
template: "order_created",
secret,
});
describe("Lemon Squeezy webhook handler", () => {
it("accepts a signed order_created", async () => {
const response = await send(process.env.LEMONSQUEEZY_WEBHOOK_SECRET!);
expect(response.status).toBeGreaterThanOrEqual(200);
expect(response.status).toBeLessThan(300);
});
it("rejects a forged signature", async () => {
const response = await send("not-the-real-secret");
// A 4xx, not a crash: providers retry 5xx responses.
expect(response.status).toBeGreaterThanOrEqual(400);
expect(response.status).toBeLessThan(500);
});
});
Let your coding agent write and run it: the webhooks.cc agent skill teaches Claude Code, Cursor, and Codex to test webhook handlers with signed payloads. More patterns in the SDK testing docs.
Everything in one place
- Live dashboard: see deliveries the moment they arrive
- Forward to localhost with whk tunnel
- Replay any captured request to any URL
- Mock responses with custom status, headers, and body
- Forward to your servers, Slack or Discord
- TypeScript, Python and Go SDKs for CI assertions
- MCP server for AI coding agents
Lemon Squeezy webhook questions
4242 4242 4242 4242 (Visa), 5555 5555 5555 4444 (Mastercard) and 3782 822463 10005 (American Express) succeed. 4000 0000 0000 9995 is declined for insufficient funds, 4000 0000 0000 0069 as expired, and 4000 0027 6000 3184 asks for 3D Secure. Use any future expiry date and any three-digit CVC.
Yes. In test mode webhooks fire for every event, as in live mode, and you can also simulate subscription webhooks from the Lemon Squeezy dashboard. Test and live webhooks are configured separately, so point the test-mode webhook at a webhooks.cc endpoint to see each payload, then add a live webhook for production.
Create a free endpoint on webhooks.cc (sign in with GitHub, Google, or email, or use a guest endpoint without an account), then configure it as your webhook URL: Lemon Squeezy → Settings → Webhooks. Every delivery shows up live in the dashboard with full headers, body, and query parameters. To hit a local server, run whk tunnel <port> and the CLI forwards each webhook to localhost.
Yes. webhooks.cc ships Lemon Squeezy templates (order_created, subscription_created, subscription_payment_success) with realistic payloads and correctly computed signature headers. Send them from the dashboard, the SDK, or the MCP server to exercise your handler end-to-end.
Lemon Squeezy signs each delivery with the x-signature header using HMAC-SHA256. webhooks.cc verifies these signatures for you: add your signing secret to the endpoint and every captured request is marked valid or invalid in the dashboard.
Yes. A free account gets you persistent endpoints, 50 requests per day, 7-day retention, and full CLI, SDK, and MCP access, with no credit card. You can also try a guest endpoint without an account: up to 25 requests for 12 hours.
More providers
Your Lemon Squeezy webhook URL is seconds away
Sign up free, create an endpoint, and point Lemon Squeezy at it.
No credit card · or try without an account