Home/Use cases/New sale notifications
Use case ยท Sales & payments

Get a push notification when you make a sale

There is nothing quite like your phone buzzing with "๐Ÿ’ฐ New order ยท $49." For indie hackers and small stores, that little dopamine hit is half the reason you're building the thing. Wire Stripe or Shopify to Lert and every real sale lands in your pocket the second the money clears.

The "ka-ching" you'll actually feel

Big platforms have their own seller apps, but they're bloated, they nag you about unrelated things, and they rarely buzz your watch the instant a payment succeeds. If you run your own checkout โ€” a Stripe integration, a headless Shopify store, a Gumroad-style flow โ€” you already receive a webhook when someone pays. Forwarding that one event to your phone takes a few lines, and the result is a clean, instant, celebratory buzz with the exact amount on it.

The one-line version

Lert gives you a unique URL. When a payment clears, POST the total:

curl
curl -X POST "https://lert.dev/p/your-id" \
  -H "Content-Type: application/json" \
  -d '{"title":"๐Ÿ’ฐ New sale โ€” $49.00","body":"Pro plan ยท jane@acme.com","tag":"sales"}'

No auth token, no SDK. The tag keeps every sale grouped in your in-app history, so you can scroll back through the day's orders.

Stripe: payment_intent.succeeded

1. Copy your Lert URL

Grab your endpoint from the Lert app โ€” https://lert.dev/p/your-id โ€” and keep it in an env var alongside your Stripe keys.

2. Handle the webhook

Subscribe to payment_intent.succeeded (or checkout.session.completed if you use Checkout), verify the signature, and forward the amount:

Node ยท Stripe
app.post("/stripe", express.raw({ type: "application/json" }), async (req, res) => {
  let event;
  try {
    event = stripe.webhooks.constructEvent(
      req.body, req.headers["stripe-signature"], process.env.WHSEC
    );
  } catch {
    return res.sendStatus(400);
  }

  if (event.type === "payment_intent.succeeded") {
    const pi = event.data.object;
    const amount = (pi.amount / 100).toFixed(2);
    await fetch("https://lert.dev/p/your-id", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        title: `๐Ÿ’ฐ New sale โ€” $${amount}`,
        body: pi.description ?? pi.receipt_email ?? "payment received",
        tag: "sales"
      })
    });
  }

  res.sendStatus(200);
});

Shopify: orders/create

In your Shopify admin, add an orders/create webhook pointing at your handler. The payload gives you the order number and total directly:

Node ยท Shopify
app.post("/shopify", express.json(), async (req, res) => {
  const order = req.body;
  await fetch("https://lert.dev/p/your-id", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      title: `๐Ÿ›’ Order ${order.name} โ€” ${order.currency} ${order.total_price}`,
      body: `${order.line_items.length} item(s) ยท ${order.customer?.email ?? "guest"}`,
      tag: "shopify"
    })
  });
  res.sendStatus(200);
});

Make a test purchase and your phone buzzes with the total. It's a real iOS push โ€” it wakes a locked phone and taps a paired Apple Watch, usually within a second.

Since you're already in the webhook. The same handler shape covers other events worth a buzz โ€” a new signup form, a generic webhook forward, or a deploy. The reusable helper lives in the Node guide, and there's a Python version if your store runs on Django or Flask.

Getting it right

  • Pick the "paid" event. Use payment_intent.succeeded or orders/paid, not events that fire before money moves, so a buzz always means real revenue.
  • Dedupe on the id. Providers retry webhooks. Remember the last few order or event ids and skip repeats so one sale is one notification.
  • Put the money in the title. The amount is the whole point โ€” you want to read it without unlocking.

Why Lert for sale alerts

The alternatives are a heavyweight seller app you don't control or an automation platform that charges per task and adds latency. Lert is one fetch in the webhook handler you already run โ€” instant, formatted exactly how you want, and free for your first fifty sales a day. The endpoint URL is the authentication, so every "ka-ching" reaches your pocket with zero extra setup.

FAQ

Which event should I use for Stripe?

Use payment_intent.succeeded for a confirmed payment, or checkout.session.completed if you use Stripe Checkout. Both fire once the customer has actually paid, so the notification means real money.

Does this work with Shopify?

Yes. Subscribe to the orders/create webhook in your Shopify admin, point it at a small handler, and forward the order total and number to Lert. Use orders/paid instead if you only want captured orders.

Will I get double notifications if the webhook retries?

Providers retry webhooks, so dedupe on the event or order id before sending. Keep a short-lived record of ids you've already notified and skip repeats โ€” Lert delivers whatever you send, so deduping happens in your handler.

Do I need an API key or account?

No. Your Lert endpoint URL is the authentication โ€” there's no separate key, token, or login to wire up.

Feel every sale the second it lands.

Download Lert, copy your URL, add one fetch to your payment webhook. Your phone celebrates for you.

Get the app iOS