Guides / Platforms & Tools

How to Know When Your App Makes Money

3 min read·Platforms & Tools

The Habit You Want to Break

Refreshing Stripe every 30 minutes. Checking your dashboard before bed. Opening your phone to see if anyone paid while you slept.

There's a better way: let your app tell you.

The One-Line Version

The fastest path — add this to your payment success handler:

ts
import { init } from "logit";
const logit = init({ token: process.env.LOGIT_API_KEY! });

// After payment succeeds
await logit.now("payments", {
  event: "App made money 💰",
  description: `${customerEmail} — $${(amountCents / 100).toFixed(2)}`,
  icon: "💰",
  notify: true,
});

That's it. You'll get a push notification within seconds of the payment.

With Stripe (full version)

ts
case "checkout.session.completed": {
  const session = event.data.object;
  await logit.now("payments", {
    event: "App made money 💰",
    description: `${session.customer_email} — $${((session.amount_total ?? 0) / 100).toFixed(2)}`,
    icon: "💰",
    notify: true,
    tags: { currency: session.currency ?? "usd" },
    metadata: {
      sessionId: session.id,
      email: session.customer_email,
      amount: session.amount_total,
    },
  });
}

With Lemon Squeezy

ts
if (event_name === "order_created") {
  await logit.now("payments", {
    event: "App made money 🍋",
    description: `${attrs.user_email} — $${(attrs.total / 100).toFixed(2)}`,
    icon: "🍋",
    notify: true,
  });
}

The feeling

First time you get this notification while you're out for a walk — that's when it clicks.

Try LogIt free

7-day trial. No credit card required.

Start free