Guides / Platforms & Tools
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 fastest path — add this to your payment success handler:
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.
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,
},
});
}
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,
});
}
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.