Inspiration
PayLedgr started in a small shop, not a startup office. My cousin runs an electronics store in Chunian that sells on installments. His customers pay a little every month, and every month the same problem showed up: someone forgets, someone dodges, and the owner spends hours chasing payments by phone and in notebooks.
Many of the people involved were not tech-literate. They did not need a dashboard full of charts. They needed something that worked the way they already communicate: WhatsApp and phone calls.
So I built a system for that one shop. It worked. Then I looked around and realized that thousands of businesses (electronics, furniture, mobile phones, appliances, rent-to-own, buy-here-pay-here auto) run on the same broken process. That is when I turned a private tool into a public product.
What PayLedgr does
PayLedgr is a WhatsApp-native payment tracking and recovery platform for businesses that sell on installments.
- Automated WhatsApp messages: payment receipts, upcoming-due reminders, overdue notices, and guarantor alerts, sent through Meta-approved templates that always name the shop the message is from
- AI voice calling: an AI agent calls overdue customers, listens, replies, and records the outcome, with four voices (American and British, male and female)
- Collector management: field collectors get their own app, and owners see activity and performance
- Analytics: collection reports, customer risk scores, and collector rankings
- Mobile and desktop apps: Android (Expo) and Windows/Mac (Electron), synced to one backend
- Multi-tenant by design: every business gets its own isolated data, license key, plan limits, and optional white-label WhatsApp number
Plans run from a free tier (15 customers) to Pro ($25/mo) and Premium ($75/mo).
How I built it
Stack: Node.js and Express on the backend, Supabase (Postgres) for data, React Native/Expo for mobile, Electron and React for desktop, and TanStack Start for the website.
Messaging: Every WhatsApp send goes through one template registry and a retry queue. Variables are validated before a message is queued, failed sends retry with backoff, and nothing is sent with a missing placeholder. Inbound replies are routed by phone number to the right business, with session tracking for WhatsApp's 24-hour window.
Voice: SignalWire handles the phone calls. Speech is transcribed, an AI model decides the reply, and Kokoro TTS turns it into a natural voice. The AI models (Qwen via Ollama) run on my own server, which keeps voice latency low and per-call costs near zero.
AI pipeline: Every AI task passes through three stages: a refiner that builds the prompt with business context, the model itself, and a validator that checks format, tone, and safety before anything reaches a customer.
Security: Cloudflare WAF and rate limiting sit in front of Nginx. The backend adds brute-force protection, per-IP throttling, signed webhooks, tenant isolation checks, and Fail2Ban. Plan limits for devices and message credits are enforced server-side.
Billing: LemonSqueezy handles subscriptions, with signature-verified webhooks that activate licenses and are safe against duplicate delivery.
Challenges
- Running voice AI on a small server. Text-to-speech, speech-to-text, and language models compete for the same RAM and CPU. I had to measure memory carefully and design a queue so concurrent calls degrade gracefully instead of crashing.
- Locking down security without breaking real traffic. An early Cloudflare rule set challenged every non-browser request, which blocked my own apps and webhooks. I had to rebuild the rules around what legitimate clients actually send.
- WhatsApp's rules. Approved templates, the 24-hour session window, and restrictions on authentication templates for new accounts all shaped the design. I built phone lookup and tie-breaking so one shared number can serve many businesses without mixing up their customers.
- Subtle bugs that tests caught. A revoked device could silently re-register itself, and a redelivered billing webhook could issue a second license. Both were found in audits and fixed.
- Building as one person on a tight budget. Every infrastructure choice had to be weighed against cost, so I leaned on self-hosted models and open-source tools wherever I could.
What I learned
- Start from a real user. A system built for one shop's messy reality was a better foundation than a generic idea.
- Reliability matters more than features in anything that touches money. Queues, retries, and idempotency are not optional.
- Security is mostly about understanding your own traffic, not stacking more rules.
- AI works best with guardrails. The refine-and-validate pipeline matters as much as the model.
What's next
- Launch on Google Play and onboard the first paying businesses
- Add WhatsApp button-based phone verification
- Add a support inbox with an AI agent that answers routine questions around the clock
- Scale voice capacity as call volume grows
- Expand beyond Pakistan into the US market
Try it: payledgr.com
Built With
- cloudflare
- electron
- expo.io
- express.js
- framer
- kokoro-tts
- lemonsqueezy
- nginx
- node.js
- ollama
- pm2
- postgresql
- qwen
- react
- react-native
- signalwire
- supabase
- tailwind-css
- tanstack-start
- typescript
- vite
- whatsapp-cloud-api
- whisper
