Piton Studios
Piton Studios
[36]

Payment Tracker Bot

2025
[ VIDEO · PROJECT ]
Client
Piton Studios
Year
2025
Scope
Automation, backend, Telegram integration
Role
Development
§ Case Study

Payment Tracker Bot — Payment-tracking web app that sends automatic Telegram reminders as due dates approach.

We built a web app that monitors company payments (installments, cheques, cash and more) and sends automatic Telegram reminders as due dates approach — on a lightweight, reliable Node.js, Express and SQLite stack.

Auto-generated installment schedules, dashboards for overdue and next-7-days payments, and financial-integrity safeguards for settled records make it a concrete example of automating business workflows.

Node.jsTelegram BotAutomationFintech

Challenge

The company was tracking credit-card installments, cheques, cash payments and other payment types by hand; forgotten due dates created late-payment risk, and payments were kept in different notebooks or spreadsheets by different people. What it needed was a lightweight but reliable system that could run on a single server without a separate ops team or complex infrastructure, while automating due-date tracking and alerting the right people on time. It also had to keep settled records from being altered by accident during edits, and export period-end reports with Turkish characters intact.

Solution

We built a server-rendered web app with Node.js, Express and EJS, backed by a single-file SQLite database via better-sqlite3. For installment payments, a monthly schedule is generated automatically from the first due date, including correction for month-end overflow; amounts are balanced on the last installment so no fraction of a currency unit is lost. node-cron runs a due-date check every day at 09:00, a daily summary at 08:00, and a weekly plan message every Monday at 08:15, all delivered via the Telegram Bot API; a notification log table guarantees the same reminder is never sent twice for the same due date. Authentication hashes passwords with bcrypt and stores sessions in a file-based store (session-file-store), so sessions survive a server restart. The payments page offers a filter-aware CSV export with a UTF-8 BOM and semicolon separators. The interface is built with compiled Tailwind CSS, served with no CDN dependency.

Key technical decisions

  • Installment-schedule automation: monthly installments generate automatically from the first due date, month-end overflow is corrected, and any rounding difference is balanced onto the last installment.
  • Three separate automations run through the Telegram Bot API: a single due-date reminder (lead time configurable), a daily summary (08:00) and a weekly plan (Monday 08:15) — all scheduled with node-cron.
  • A notification log table (a uniqueness constraint on installment_id + window_days) stops the same reminder from ever being sent more than once.
  • Editing a payment that already has a settled installment never regenerates the due-date schedule — payment history stays intact.
  • A UTF-8 BOM, semicolon-separated CSV export respects active filters and displays Turkish characters correctly straight in Excel.

Tech stack

Node.jsExpressEJSbetter-sqlite3node-cronTelegram Bot APITailwind CSSbcrypt

Outcome

The company now tracks every payment type from a single panel and no longer has to remember due dates by hand; automatic Telegram reminders plus daily and weekly summaries have cut late-payment risk. Settled records stay protected during edits, so financial history remains trustworthy; period-end reporting is faster with a filter-aware CSV export, and sessions survive a server restart without interruption.

Related solutions