Lemon Squeezy new subscriber notifications on your phone.

Get a push notification when someone starts a Lemon Squeezy subscription or free trial.

subscription_createdFinanceSubscriptions
How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into Lemon Squeezy

Add it as a webhook for subscription_created.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Lemon Squeezy subscription_created webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In Lemon Squeezy, go to Settings > Webhooks and add a webhook.
  3. Paste your webhook URL as the callback URL, enter a signing secret, and tick subscription_created.https://••••••••/•••••••• your personal URL, shown after install
  4. Save. Test mode and live mode have separate webhooks.
  5. Add a webhook under **Settings → Webhooks** with the URL above and tick `subscription_created`. An `order_created` event fires for the same checkout; subscribe to one or the other if you don't want two pushes.
  6. Lemon Squeezy signs deliveries with `X-Signature` (HMAC-SHA256 of your signing secret), but JustPush doesn't check it yet, so keep your endpoint URL private.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// Lemon Squeezy → subscription created
2// Fires when a customer starts a subscription or trial. (An order_created event fires too;
3// pick one of the two recipes if you don't want both pushes.)
4// Docs: https://docs.lemonsqueezy.com/help/webhooks/event-types
5
6// "12 Oct" from an ISO timestamp.
7function day(iso) {
8 const date = new Date(iso)
9 return Number.isNaN(date.getTime())
10 ? null
11 : date.toLocaleDateString("en-GB", { day: "numeric", month: "short", timeZone: "UTC" })
12}
13
14// The event name comes in the X-Event-Name header and in meta.event_name.
15// Header names can arrive in any case.
16function header(request, name) {
17 const headers = request.headers || {}
18 const key = Object.keys(headers).find((k) => k.toLowerCase() === name)
19 const value = key ? headers[key] : null
20 return Array.isArray(value) ? value[0] : value
21}
22
23// Lemon Squeezy puts test_mode in meta on real deliveries and in the attributes in its examples.
24function testMode(body) {
25 return (body.meta?.test_mode ?? body.data?.attributes?.test_mode) === true ? " (test mode)" : ""
26}
27
28// Only link to real http(s) URLs.
29function link(url, cta) {
30 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
31}
32
33function handleRequest(request) {
34 const body = request.body || {}
35 const event = header(request, "x-event-name") ?? body.meta?.event_name
36 const order = body.data?.attributes ?? {}
37
38 // Guard: only subscription_created events.
39 if (event !== "subscription_created") {
40 console.log(`Ignoring Lemon Squeezy "${event ?? "unknown"}" event`)
41 return null
42 }
43
44 const sub = order
45 const product = [sub.product_name, sub.variant_name && sub.variant_name !== "Default" ? sub.variant_name : null].filter(Boolean).join(" — ")
46 const trial = sub.status === "on_trial" && sub.trial_ends_at && day(sub.trial_ends_at) ? ` (trial until ${day(sub.trial_ends_at)})` : ""
47
48 return {
49 title: sub.status === "on_trial" ? "🧪 New trial" : "🎉 New subscriber",
50 message: [sub.user_name, product].filter(Boolean).join(" — ") + trial + testMode(body) || "New subscription",
51 topic: "Lemon Squeezy",
52 priority: 0, // Normal — recurring revenue, worth a smile
53 ...(sub.status === "on_trial" ? {} : { sound: "cashregister" }),
54 buttons: link(sub.urls?.customer_portal, "Customer portal"),
55 }
56}
Payload

The Lemon Squeezy subscription_created webhook

This is what Lemon Squeezy sends to your URL for subscription_created. It is a sample, trimmed to the fields recipes use.

subscription_created · sample.json
1{
2 "data": {
3 "id": "33445",
4 "type": "subscriptions",
5 "attributes": {
6 "urls": {
7 "customer_portal": "https://acme.lemonsqueezy.com/billing?expires=1790700000&signature=abc",
8 "update_payment_method": "https://acme.lemonsqueezy.com/subscription/33445/payment-details?signature=abc"
9 },
10 "pause": null,
11 "status": "on_trial",
12 "ends_at": null,
13 "order_id": 1234567,
14 "store_id": 12345,
15 "cancelled": false,
16 "renews_at": "2026-10-13T09:45:53.000000Z",
17 "test_mode": false,
18 "user_name": "Jane Doe",
19 "user_email": "[email protected]",
20 "product_name": "Acme Pro",
21 "variant_name": "Monthly",
22 "trial_ends_at": "2026-10-13T09:45:53.000000Z",
23 "status_formatted": "On Trial"
24 }
25 },
26 "meta": {
27 "test_mode": false,
28 "event_name": "subscription_created",
29 "webhook_id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d"
30 }
31}
FAQ

Lemon Squeezy new subscriber notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into Lemon Squeezy and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

Lemon Squeezy on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.