A professional booking bot for salons, barbershops, and service businesses — with integrated Stripe payments.
Built with Node.js + Telegraf + Stripe + SQLite
Perfect for:
- 💈 Salons & Barbershops — haircuts, styling, coloring appointments
- 💅 Nail Studios — manicure, pedicure booking
- 🏋️ Fitness Centers — personal training sessions
- 👨⚕️ Medical Clinics — doctor appointments
- 🎓 Tutors & Coaches — lesson scheduling
- 🐕 Pet Services — grooming, veterinary visits
- 🗓 Browse Services — view prices and durations
- 📅 Book Appointment — step-by-step booking flow
- 💳 Online Payment — secure Stripe checkout
- 📋 My Bookings — view all appointments and payment status
- ❌ Cancel Booking — cancel with automatic refund notice
- 📊 Admin Stats — total revenue, pending bookings, daily stats
- 📋 All Bookings — view every appointment in the system
- 🔔 Instant Notifications — get notified of new bookings
- 💰 Payment Tracking — see paid vs unpaid bookings
- Customer selects service → date → time → enters phone
- Stripe payment link generated
- Customer pays online
- Webhook confirms payment automatically
- Booking confirmed, customer notified
- Node.js 16+
- Stripe account (for test keys)
- Telegram Bot Token from @BotFather
git clone https://github.com/nullbit26/tg-booking-bot.git
cd tg-booking-bot
npm install- Copy
config.json.exampletoconfig.json(just rename the file) - Open
config.jsonin Notepad and fill in your values:
{
"BOT_TOKEN": "your_bot_token_here",
"ADMIN_IDS": "your_telegram_id_here",
"STRIPE_SECRET_KEY": "sk_test_xxx",
"STRIPE_WEBHOOK_SECRET": "whsec_xxx",
"WEBHOOK_URL": "https://your-domain.com/webhook",
"PORT": 3000
}How to get these values:
- BOT_TOKEN: Message @BotFather in Telegram, create new bot, copy token
- ADMIN_IDS: Message @userinfobot, copy your ID number
- STRIPE_SECRET_KEY: Go to stripe.com → Developers → API Keys → Create test key
- STRIPE_WEBHOOK_SECRET: Stripe Dashboard → Developers → Webhooks → Add endpoint → Copy signing secret
node bot.js| Service | Price | Duration |
|---|---|---|
| Haircut | 1,500₽ | 60 min |
| Beard Trim | 800₽ | 30 min |
| Full Service | 2,000₽ | 90 min |
| Hair Coloring | 3,500₽ | 120 min |
tg-booking-bot/
├── bot.js # Bot logic, handlers, Stripe integration
├── database.js # SQLite wrapper, all DB operations
├── package.json
├── config.json.example
├── .gitignore
└── README.md
| Command | Description |
|---|---|
/start |
Welcome & menu |
/services |
View all services |
/book |
Start booking process |
/mybookings |
View my appointments |
/cancel |
Cancel a booking |
/adminstats |
Business stats (admin only) |
/adminbookings |
All bookings list (admin only) |
- Node.js — runtime
- Telegraf v4 — Telegram Bot framework
- Stripe — payment processing
- Express — webhook server
- sql.js — local SQLite database (pure JavaScript, no compilation needed)
- Webhook signature verification
- API keys in
config.json(not committed to Git) - No sensitive data in code
- SQLite for local data storage
For portfolio/demo purposes, the bot code demonstrates full Stripe integration including webhook handling. To test payments end-to-end:
- Install ngrok:
ngrok http 3000 - Copy HTTPS URL (e.g.,
https://abc123.ngrok.io/webhook) - Add to Stripe Dashboard → Webhooks
- Set
WEBHOOK_URLinconfig.json
Without ngrok/server, the booking and payment link generation still works — webhook just won't auto-confirm (you'd confirm manually via database).
For real payments:
- Switch to Stripe live keys (
sk_live_...) - Use HTTPS webhook URL
- Set up proper hosting (VPS, Railway, etc.)
- Configure webhook in Stripe dashboard
MIT