Every mobile-money payment, verified the second it arrives.

An Android handset forwards each bKash, Nagad and Rocket confirmation to a token-authenticated webhook. Milliseconds later it is a structured, deduplicated transaction on the ledger — no screenshots, no spreadsheets, no taking a student’s word for it.

Two-app monorepo
Express 5 · SvelteKit 2
Payment platforms
bKash · Nagad · Rocket
Data entry
None
Read the build bKash Nagad Rocket
14:32
4G
b
bKash
16247

Your bKash Account balance is Tk 700.00

Before this existed, a payment was verified by squinting at a screenshot.

Nihonova Academy takes course fees over mobile money. The verification step — not the payment — was the part that broke.

The old way
  1. 1 Student pays, screenshots the confirmation, sends the image on WhatsApp
  2. 2 Staff open the bKash, Nagad or Rocket app and hunt for a matching line
  3. 3 Transaction ID is retyped into a spreadsheet, one digit at a time
  4. 4 A forwarded screenshot from last week reads exactly like a new one
  5. 5 Nobody can say what came in today without adding it up by hand

Minutes per payment · mistakes invisible until reconciliation

What runs now
  1. 1 The handset forwards the confirmation the moment it arrives
  2. 2 The parser resolves platform, amount, sender and trxId in milliseconds
  3. 3 The row is written to that platform’s collection — no typing anywhere
  4. 4 A repeat of the same trxId is rejected by the index before it is stored
  5. 5 Today, this week and this month are already totalled on the dashboard

One webhook round trip · nothing typed by a human

From a phone in Dhaka to a row on the ledger.

Four hops, all of them automatic. The slowest part of the whole chain is the mobile network delivering the SMS.

01

The SMS lands

Android forwarder

A payment text arrives on the academy handset. The forwarder app picks it up and posts the raw body onward — no screenshots, no manual entry.

02

Authenticated webhook

POST /webhooks/sms

The shared secret is compared against WEBHOOK_SECRET in constant time before a single byte is parsed. An unset secret in production fails closed, not open.

03

Parsed to structure

parsePayment()

One of three regex parsers pulls out amount, sender, fee, balance and trxId — and converts the SMS’s Bangladesh local time to UTC on the way in.

04

Stored & deduped

MongoDB

Written to that platform’s own collection. A unique index on trxId makes a redelivered SMS a no-op, so a retry can never double-count a payment.

Three providers. Three formats. One shape.

bKash writes one long line, Nagad writes labelled lines, Rocket masks the sender to an account tail. Each gets its own parser, and all three land in the same normalised document. Hover a value to trace it across.

Raw SMS from 16247

You have received Tk 500.00 from 01712345678. Fee Tk 0.00. Balance Tk 1,200.00. TrxID AB1234CDEF at 08/06/2026 14:32

parse
Stored document db.bkash
{
"platform": "bkash"
"amount": 500
"sender": "01712345678"
"fee": 0
"balance": 1200
"trxId": "AB1234CDEF"
"dateReceived": "2026-06-08T08:32:00.000Z"
"timeReceived": "14:32"
}
Unique on trxId BDT → UTC on write

Send Money, Cash In and merchant Pay Bill each have their own pattern.

Three decisions that carry the whole thing.

Money makes correctness non-negotiable. These are lifted verbatim from the running server — the file each one lives in is named beside it.

1trxId: {
2 type: String,
3 required: true,
4 unique: true,
5 index: true,
6},
7 
8// routes/webhook.js — the write is simply attempted.
9try { await doc.save(); } catch (err) {
10 if (err.code === 11000) {
11 // Already stored by an earlier delivery. 200, not 500,
12 // so the forwarder stops retrying.
13 return res.status(200).json({ reason: 'duplicate' });
14 }
15}

A retried SMS cannot double-count a payment.

Idempotency is a database constraint, not a lookup-then-write. There is no window between the check and the insert for a second delivery to slip through.

apps/server/src/models/createPaymentModel.js

What the system promises, at any volume.

6 SMS shapes
bKash alone prints four: Send Money, Cash In, merchant Pay Bill and internet-banking deposit. Nagad and Rocket add one each. Every shape has its own tested regex.
1 unique index
Deduplication is a constraint on trxId, not a lookup. The forwarder may redeliver the same text forever; the ledger absorbs it and answers 200.
+06:00 every roll-up
Timestamps store as UTC and every per-day aggregate groups in Bangladesh time, so a payment made at 1 AM is counted on the day the student made it.
0 tokens in JavaScript
The dashboard session is an httpOnly cookie no script can read, behind credentialed CORS that echoes one exact origin and never a wildcard.

Twelve modules, named as the repo names them.

Two apps, no shared root package. The server never renders a page; the dashboard never touches the database.

Ingest

Untrusted input, checked before it is read

Android forwarder
on the academy handset
then
POST /webhooks/sms
routes/webhook.js
then
verifySignature
timingSafeEqual on WEBHOOK_SECRET
then
parsePayment
services/parsePayment.js
Store

One collection per platform, unique on trxId

bkash
models/Bkash.js
then
nagad
models/Nagad.js
then
rocket
models/Rocket.js
then
webhookevents
ingestion health
Read

Credentialed JSON, no token in JavaScript

requireAdmin
httpOnly JWT cookie
then
/admin/api/*
routes/admin.js — fans out across all three
then
TanStack Query
lib/query.ts
then
Dashboard
SvelteKit 2 · Svelte 5 runes

The ledger, live.

Totals by day, week and month; volume split by platform; and a searchable ledger where a student’s transaction ID resolves in one keystroke. Below is the real interface — access is staff-only, so this is where it can be seen.

nihonova.app/dashboard
Today
৳12,450
31 payments
This week
৳68,900
184 payments
This month
৳284,500
512 payments
Unique senders
347
across 3 platforms
Daily volume bKash Nagad Rocket
28 May02 Jun08 Jun
Latest transactions
AB1234CDEF
01712345678
৳500.00
14:32
75HKUOBF
01634358056
৳99.00
19:00
6606781284
***515
৳99.00
06:21
CD8842QQZ1
01988201144
৳3,500.00
11:07

Designed and built by Moshiur Rahman.

Sole engineer and designer: the SMS parsers, the webhook API, the aggregation queries, the design system and every screen of the dashboard. Built for a real academy taking real course fees, and running in production.

Role
Full-stack · design
Scope
Server, dashboard, design system
Users
Academy admin staff
Status
In production
API
  • Node.js
  • Express 5
  • Mongoose 9
  • MongoDB
Dashboard
  • SvelteKit 2
  • Svelte 5 runes
  • TanStack Query v6
  • Chart.js
Styling
  • Tailwind v4
  • Design tokens
  • JetBrains Mono
Shipping
  • Vercel
  • adapter-vercel
  • Node 20
© 2026 Nihonova Academy Payment verification gateway · built by Moshiur Rahman